feat(api): migracion completa de Flask API a FastAPI ASGI con arquitectura en 4 capas v3.6.0

This commit is contained in:
2026-10-16 17:36:44 -03:00
parent 5057d648c9
commit 37c21e1cd8
28 changed files with 1956 additions and 309 deletions
+10 -4
View File
@@ -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)