import os
import sys
from a2wsgi import ASGIMiddleware

# Ensure the app directory is in the path
sys.path.insert(0, os.path.dirname(__file__))

# Import your FastAPI instance from app/main.py
from app.main import app

# Bridge ASGI to WSGI for Passenger
application = ASGIMiddleware(app)