kin: BATON-002 [Research] UX Designer
This commit is contained in:
commit
057e500d5f
29 changed files with 3530 additions and 0 deletions
21
backend/config.py
Normal file
21
backend/config.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
def _require(name: str) -> str:
|
||||
value = os.getenv(name)
|
||||
if not value:
|
||||
raise RuntimeError(f"Required environment variable {name!r} is not set")
|
||||
return value
|
||||
|
||||
|
||||
BOT_TOKEN: str = _require("BOT_TOKEN")
|
||||
CHAT_ID: str = _require("CHAT_ID")
|
||||
DB_PATH: str = os.getenv("DB_PATH", "baton.db")
|
||||
WEBHOOK_SECRET: str = _require("WEBHOOK_SECRET")
|
||||
WEBHOOK_URL: str = _require("WEBHOOK_URL")
|
||||
FRONTEND_ORIGIN: str = os.getenv("FRONTEND_ORIGIN", "http://localhost:3000")
|
||||
Loading…
Add table
Add a link
Reference in a new issue