Working development server (no encryption now)

This commit is contained in:
BarsTiger
2023-07-02 11:54:49 +03:00
parent 68f1990b7e
commit 2a4e40b41b
23 changed files with 486 additions and 9 deletions

View File

@@ -14,7 +14,9 @@ def get_app(port: int, name: str) -> FastAPI:
)
def run(name: str, port: int = get_available_port()):
def run(name: str, port: int | None = get_available_port()):
if port is None:
port = get_available_port()
app = get_app(port, name)
app.include_router(router)
uvicorn.run(app, host='0.0.0.0', port=port)