I have a problem deploying a minimal FastAPI app
It’s been like this for hours
The project has 1 Python file, main.py
:
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
origins = ["*"]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/")
def hello():
return {"Hello": "World"}
and a requirements.txt
file:
fastapi
uvicorn[standard]
Build command: pip install -r requirements.txt
Start command: uvicorn main:app --host 0.0.0.0 --port 10000