tracker / app /config /settings.py
MatrixIA's picture
Update app/config/settings.py
23c0537 verified
raw
history blame contribute delete
442 Bytes
import os
from dotenv import load_dotenv
load_dotenv()
MONGODB_URL = os.getenv("MONGODB_URL", "mongodb://localhost:27017")
DATABASE_NAME = os.getenv("DATABASE_NAME", "expense_tracker")
COLLECTION_NAME = os.getenv("COLLECTION_NAME", "monthly_records")
# CORS
ALLOWED_ORIGINS = [o.strip() for o in os.getenv("ALLOWED_ORIGINS", "http://localhost:3000").split(",") if o.strip()]
ALLOWED_ORIGIN_REGEX = os.getenv("ALLOWED_ORIGIN_REGEX") # new