Spaces:
Paused
Paused
File size: 412 Bytes
eaae7e6 d6e62dd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from fastapi import FastAPI
import uvicorn
from starlette.middleware.cors import CORSMiddleware
app = FastAPI()
app.add_middleware(CORSMiddleware,
allow_origins=["*"],
allow_methods=["*"],
allow_headers=["*"])
@app.get("/")
def helloWorld():
return "Hello Peter!"
if __name__ == "__main__":
uvicorn.run("backend:app", host="0.0.0.0", port=8080) |