import sys
import os

# Agregar el directorio actual del backend al PATH de Python
sys.path.insert(0, os.path.dirname(__file__))

# Importar la app de FastAPI
from main import app
from a2wsgi import ASGIMiddleware

# Convertir la aplicación ASGI (FastAPI) en WSGI para que sea compatible con cPanel (Phusion Passenger)
application = ASGIMiddleware(app)
