spotify-clone/backend/core/config.py

22 lines
574 B
Python

from pydantic_settings import BaseSettings
from pathlib import Path
class Settings(BaseSettings):
APP_NAME: str = "Spotify Clone Backend"
API_V1_STR: str = "/api"
CACHE_DIR: Path = Path("backend/cache")
DATA_DIR: Path = Path("backend/data")
# CORS
BACKEND_CORS_ORIGINS: list[str] = [
"http://localhost:3000",
"http://127.0.0.1:3000",
"http://192.168.1.5", # Common local IP for testing
"http://192.168.1.13"
]
class Config:
case_sensitive = True
env_file = ".env"
settings = Settings()