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