22 lines
604 B
Python
22 lines
604 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
backend_dir = Path(__file__).resolve().parent.parent
|
|
load_dotenv(backend_dir / ".env")
|
|
|
|
|
|
class Settings:
|
|
app_name = "HTML Generator API"
|
|
api_prefix = "/api"
|
|
backend_dir = backend_dir
|
|
data_dir = backend_dir / "data"
|
|
database_path = data_dir / "html_generator.db"
|
|
database_url = f"sqlite:///{database_path.as_posix()}"
|
|
allowed_origins = ["*"]
|
|
frontend_base_url = os.environ.get("FRONTEND_BASE_URL", "http://localhost:3000")
|
|
static_dir = backend_dir / "../frontend/public/static"
|
|
|
|
|
|
settings = Settings() |