feat(api): migracion completa de Flask API a FastAPI ASGI con arquitectura en 4 capas v3.6.0
This commit is contained in:
+10
-4
@@ -1,7 +1,13 @@
|
||||
from app import create_app
|
||||
"""
|
||||
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
|
||||
|
||||
app = create_app()
|
||||
# Adapt ASGI FastAPI app into WSGI callable for Gunicorn
|
||||
app = ASGIMiddleware(fastapi_app)
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Server entrypoint with auto-reload (RBAC 8 modules, ∞ Infinite Capacity & Clean Class Hours active)
|
||||
app.run(debug=True, host='0.0.0.0', port=5000)
|
||||
import uvicorn
|
||||
uvicorn.run("main:app", host="0.0.0.0", port=5000, reload=True)
|
||||
Reference in New Issue
Block a user