Skip to content

Commit 3523324

Browse files
committed
feat: environments
1 parent 9cc4b68 commit 3523324

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

fastapi_startkit/src/fastapi_startkit/environment/environment.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ def resolve_environment(base_path=None, env: str | None = None):
2626

2727
load_dotenv(path, override=True)
2828

29-
return os.environ.get("APP_ENV", "local")
29+
env = os.environ.get("APP_ENV")
30+
if not env:
31+
raise ValueError("APP_ENV not set after loading .env")
32+
33+
return env
3034

3135
@staticmethod
3236
def load_base(base_path=None):

0 commit comments

Comments
 (0)