From b7863a525ae9e00e1fd415d74b24ec4ff91b04aa Mon Sep 17 00:00:00 2001 From: Serhii Ofii <132130496+SnowGlowedMountain@users.noreply.github.com> Date: Tue, 20 Aug 2024 04:39:30 +0300 Subject: [PATCH] Update main.py --- linguaphoto/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linguaphoto/main.py b/linguaphoto/main.py index c508313..edd087c 100644 --- a/linguaphoto/main.py +++ b/linguaphoto/main.py @@ -1,6 +1,7 @@ """Defines the main entrypoint for the FastAPI app.""" from fastapi import FastAPI, Request, status +import uvicorn from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import JSONResponse @@ -27,3 +28,7 @@ async def value_error_exception_handler(request: Request, exc: ValueError) -> JS @app.get("/") async def root() -> dict[str, str]: return {"message": "Hello, World!"} + +if __name__ == "__main__": + print("Starting webserver...") + uvicorn.run(app, port=8080, host='0.0.0.0')