2025-05-17 03:38:38 +00:00

22 lines
516 B
Python

from pathlib import Path
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
API_V1_STR: str = "/api/v1"
PROJECT_NAME: str = "Todo App"
# CORS Settings
CORS_ORIGINS: list[str] = ["*"]
# Database
DB_DIR: Path = Path("/app") / "storage" / "db"
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
case_sensitive = True
settings = Settings()
# Ensure DB directory exists
settings.DB_DIR.mkdir(parents=True, exist_ok=True)