eksplicit mapping af envs
This commit is contained in:
13
backend/app/core/config.py
Normal file
13
backend/app/core/config.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
redis_url: str = "redis://localhost:6379"
|
||||
database_url: str = "postgresql+asyncpg://sighej:sighej@localhost/sighej"
|
||||
session_ttl_seconds: int = 7200
|
||||
allowed_origins: list[str] = ["http://localhost:3000"]
|
||||
|
||||
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user