Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhii Ofii authored Aug 20, 2024
1 parent 1f9ee0f commit b7863a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions linguaphoto/main.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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')

0 comments on commit b7863a5

Please sign in to comment.