"""
Entrypoint for cPanel's "Setup Python App" (Phusion Passenger).

FastAPI is an ASGI app, but cPanel's Python App integration hosts a WSGI
callable named `application`. a2wsgi's ASGIMiddleware bridges the two by
running the ASGI app in its own event loop per request - correct for a
plain request/response API like this one (no websockets or SSE).

If your Passenger version has native ASGI support enabled (6.0.15+, set
via `passenger_app_type asgi`), you can instead expose `app` directly:
    from app.main import app as application
The WSGI bridge below is the safe default that works regardless of which
Passenger mode cPanel's UI actually wires up.
"""

from a2wsgi import ASGIMiddleware

from app.main import app

application = ASGIMiddleware(app)
