ovdashboard/api/ovdashboard_api/__main__.py
2022-10-08 02:44:29 +02:00

20 lines
363 B
Python

from uvicorn import run as uvicorn_run
from .settings import SETTINGS
def main() -> None:
"""
If the `main` script is run, `uvicorn` is used to run the app.
"""
uvicorn_run(
app="ovdashboard_api:app",
host="0.0.0.0",
port=8000,
reload=not SETTINGS.production_mode,
)
if __name__ == "__main__":
main()