Files
admin-edu-space/backend/wsgi.py
T

13 lines
438 B
Python

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