File size: 667 Bytes
80a4a65
a095c00
80a4a65
a095c00
80a4a65
a095c00
80a4a65
 
a095c00
 
80a4a65
f532bd2
80a4a65
 
 
 
 
f532bd2
80a4a65
f532bd2
80a4a65
a095c00
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Top-level entry point.

Run with:

    python main.py

The real FastAPI app lives in :mod:`app.main`; this file is just the
thin launcher uvicorn needs to bind to the configured port.
"""

import os

# Load .env explicitly so the launch banner prints even if the
# worker is invoked via ``uvicorn main:app`` (which doesn't go
# through ``app.main``'s own ``load_app_env`` call first).
from app._env import load_app_env  # noqa: E402
load_app_env()

import uvicorn

from app.main import app  # noqa: F401  (re-exported for `uvicorn main:app`)


if __name__ == "__main__":
    port = int(os.environ.get("PORT", 8090))
    uvicorn.run(app, host="0.0.0.0", port=port)