14 lines
478 B
Python
14 lines
478 B
Python
"""
|
|
WSGI / ASGI compatibility bridge for Gunicorn and systemd.
|
|
Exports FastAPI application adapted via a2wsgi.ASGIMiddleware for zero-downtime compatibility.
|
|
"""
|
|
from typing import Any, cast
|
|
from main import app as fastapi_app
|
|
from a2wsgi import ASGIMiddleware
|
|
|
|
# Adapt ASGI FastAPI app into WSGI callable for Gunicorn
|
|
app = ASGIMiddleware(cast(Any, fastapi_app))
|
|
|
|
if __name__ == '__main__':
|
|
import uvicorn
|
|
uvicorn.run("main:app", host="0.0.0.0", port=5000, reload=True) |