import sys
import os

# Point to your application directory
sys.path.insert(0, os.path.dirname(__file__))

# Import the WSGI adapter and your FastAPI app
from a2wsgi import ASGIMiddleware
from app.main import app  # Import your FastAPI app from the main module

# Passenger looks for a WSGI callable named 'application'
application = ASGIMiddleware(app)