feat: add BFF backend scaffold for mobile app
This commit is contained in:
1 parent
03d21f607f
commit
591fd991fa
14 files changed
+462
No files matched your search
@@ -0,0 +1,23 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from dataclasses import dataclass
|
||||
from functools import lru_cache
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Settings:
|
||||
backend_mode: str = os.getenv("BFF_BACKEND_MODE", "mock").strip().lower()
|
||||
auth_token: str = os.getenv("BFF_AUTH_TOKEN", "dev-token").strip()
|
||||
login_password: str = os.getenv("BFF_LOGIN_PASSWORD", "dev-password").strip()
|
||||
openclaw_base_url: str = os.getenv("OPENCLAW_BASE_URL", "").strip()
|
||||
openclaw_api_token: str = os.getenv("OPENCLAW_API_TOKEN", "").strip()
|
||||
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
Reference in new issue
Block a user