ovdashboard/api/ovdashboard_api/main.py

21 lines
367 B
Python
Raw Normal View History

from uvicorn import run as uvicorn_run
2022-09-21 20:34:51 +00:00
from .settings import SETTINGS
def main() -> None:
"""
If the `main` script is run, `uvicorn` is used to run the app.
"""
uvicorn_run(
2023-10-16 18:06:55 +00:00
app="ovdashboard_api.app:app",
host="0.0.0.0",
port=8000,
2022-09-21 20:34:51 +00:00
reload=not SETTINGS.production_mode,
)
if __name__ == "__main__":
main()