File size: 766 Bytes
8d618ab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""OpenEnv server entry point for SecureReview.

This module re-exports the FastAPI app defined in ``app.main`` so the
environment is discoverable at the canonical ``server.app:app`` location
expected by ``openenv validate`` / ``openenv serve``. The ``main()``
function provides a direct-run entry point used by the ``[project.scripts]``
declaration in ``pyproject.toml``.
"""

from app.main import app

__all__ = ["app", "main"]


def main() -> None:
    """Run the SecureReview FastAPI server with uvicorn.

    Entry point for ``uv run --project . server`` and
    ``python -m server.app``.
    """
    import os
    import uvicorn

    port = int(os.getenv("PORT", "7860"))
    uvicorn.run(app, host="0.0.0.0", port=port)


if __name__ == "__main__":
    main()