"""Apache/mod_wsgi and local Flask entry point for Bridge Platform V1."""

from __future__ import annotations

from pathlib import Path

from dotenv import load_dotenv


BASE_DIR = Path(__file__).resolve().parent
load_dotenv(BASE_DIR / ".env")

from bridge_platform.runtime.app_factory import create_app


# Rebuilding the application here lets mod_wsgi pick up additive app modules
# and authorization policies when this entrypoint changes.
app = create_app()
application = app


if __name__ == "__main__":
    app.run(host="127.0.0.1", port=5000, debug=False)
