mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-26 17:33:00 +00:00
22 lines
365 B
Python
22 lines
365 B
Python
#!/usr/bin/python3
|
|
|
|
import uvicorn
|
|
|
|
from .core.settings import SETTINGS
|
|
|
|
|
|
def main() -> None:
|
|
"""
|
|
If the `main` script is run, `uvicorn` is used to run the app.
|
|
"""
|
|
|
|
uvicorn.run(
|
|
app="advent22_api.app:app",
|
|
host="0.0.0.0",
|
|
port=8000,
|
|
reload=not SETTINGS.production_mode,
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|