"""
Phusion Passenger entry point for cPanel (and similar) Python hosting.

cPanel "Setup Python App" uses this file to load your ASGI application.
After upload, set the application root to the folder that contains this file,
install requirements into the panel-created virtualenv, then restart the app.
"""
from __future__ import annotations

import os
import sys

ROOT = os.path.dirname(os.path.abspath(__file__))
if ROOT not in sys.path:
    sys.path.insert(0, ROOT)
os.chdir(ROOT)

from app.main import app  # noqa: E402

# Passenger expects this exact name for ASGI (Passenger 6+) or WSGI.
application = app
