From e26daac0dcd329aed819b6c9c497d625e20845b4 Mon Sep 17 00:00:00 2001 From: Redume Date: Sat, 19 Oct 2024 19:14:36 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20uvicorn?= =?UTF-8?q?=20run?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 3205441..0f384c4 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +import uvicorn from fastapi.staticfiles import StaticFiles from starlette.responses import FileResponse from fastapi import FastAPI @@ -12,3 +13,6 @@ app.mount('/static/', StaticFiles(directory='./src/web/static/')) @app.exception_handler(404) async def not_found(req, __): return FileResponse('./src/web/errors/404.html') + +if __name__ == '__main__': + uvicorn.run(app, host='0.0.0.0', port=9000)