Commit 682adfe1 authored by anashwara.pv's avatar anashwara.pv

Python File

parent 07ce70b5
Pipeline #37764 failed with stages
import uvicorn
from starlette.middleware.cors import CORSMiddleware
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["GET", "POST", "DELETE", "PUT"],
allow_headers=["*"],
)
@app.get("/")
def read_root():
return {"message": "Hello World "}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment