blitz_api/app/setup/router.py
fusion44 25e4be8441 feat: make config loading more flexible
If the environment variable BAPI_ENV_PATH is set, the config system will
try to read configs from the given path instead of .env in pwd

If no file is found .env in pwd will be used as a fallback

Env variables will always override settings in .env files.
2025-03-23 17:43:39 +01:00

8 lines
270 B
Python

from app.api.config import config
from app.system.models import APIPlatform
router = None
_PLATFORM = config("BAPI_PLATFORM", default=APIPlatform.RASPIBLITZ)
if _PLATFORM == APIPlatform.RASPIBLITZ:
from app.setup.impl.raspiblitz.router import router # noqa: F401