Files
mtusi2026lab2/src/__main__.py
T
Tutuxa 358ea9371b
Skeleton contracts / contracts (pull_request) Canceled after 0s
lab2: postgres, redis sessions, persistence, EXPLAIN and tests
2026-10-19 21:35:11 +03:00

23 lines
457 B
Python

"""Entry point: uvicorn as PID 1 with env-driven host/port and graceful shutdown."""
import os
import uvicorn
from .main import app
def main() -> None:
host = os.environ.get("APP_HOST", "0.0.0.0")
port = int(os.environ.get("APP_PORT", "8080"))
uvicorn.run(
app,
host=host,
port=port,
log_level="info",
access_log=True,
timeout_graceful_shutdown=5,
)
if __name__ == "__main__":
main()