mirror of
https://github.com/rjNemo/graphql-file_upload
synced 2026-06-06 02:16:44 +00:00
23 lines
825 B
Python
23 lines
825 B
Python
import os
|
|
from pathlib import Path
|
|
from typing import List
|
|
|
|
from starlette.config import Config
|
|
from starlette.datastructures import CommaSeparatedStrings
|
|
|
|
config = Config(".env")
|
|
|
|
# ------------------------------------------------------------------------------------------------------------
|
|
# Application
|
|
# ------------------------------------------------------------------------------------------------------------
|
|
VERSION = "0.1.0"
|
|
|
|
DEBUG: bool = config("DEBUG", cast=bool, default=os.getenv("DEBUG", False))
|
|
|
|
BASE_DIR = config("BASE_DIR", default=os.getenv("BASE_DIR", Path(__file__).parent.parent.parent))
|
|
|
|
PROJECT_NAME = config("PROJECT_NAME", default=os.getenv("PROJECT_NAME", "domain-service"))
|
|
|
|
ALLOWED_HOSTS: List[str] = config(
|
|
"ALLOWED_HOSTS", cast=CommaSeparatedStrings, default=os.getenv("ALLOWED_HOSTS")
|
|
)
|