code-review-env / server_runner.py
arywk-40's picture
towards the deployment
3468bd9
Raw History Blame Contribute Delete
331 Bytes
"""Console script entrypoint for serving the FastAPI app."""
from __future__ import annotations
import os
import uvicorn
def main() -> None:
host = os.getenv("HOST", "0.0.0.0")
port = int(os.getenv("PORT", "7860"))
uvicorn.run("app:app", host=host, port=port, reload=False)
if __name__ == "__main__":
main()