import os
import sys

# Ajouter le répertoire de l'application au sys.path
sys.path.insert(0, os.path.dirname(__file__))

# Importer l'adaptateur a2wsgi pour convertir l'application ASGI en WSGI
from a2wsgi import A2WSGI  # Remplacer ASGI2WSGI par A2WSGI

# Importer votre application FastAPI
from app import app  # Assurez-vous que votre fichier s'appelle app.py et que l'instance s'appelle "app"

# Créer l'application WSGI attendue par Passenger
application = A2WSGI(app)
