mirror of
https://github.com/nihilvux/bancho.py.git
synced 2025-09-16 10:38:39 -07:00
Add files via upload
This commit is contained in:
31
main.py
Normal file
31
main.py
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3.11
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
import uvicorn
|
||||
|
||||
import app.logging
|
||||
import app.settings
|
||||
import app.utils
|
||||
|
||||
app.logging.configure_logging()
|
||||
|
||||
|
||||
def main() -> int:
|
||||
app.utils.display_startup_dialog()
|
||||
uvicorn.run(
|
||||
"app.api.init_api:asgi_app",
|
||||
reload=app.settings.DEBUG,
|
||||
log_level=logging.WARNING,
|
||||
server_header=False,
|
||||
date_header=False,
|
||||
headers=[("bancho-version", app.settings.VERSION)],
|
||||
host=app.settings.APP_HOST,
|
||||
port=app.settings.APP_PORT,
|
||||
)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
exit(main())
|
Reference in New Issue
Block a user