Commit 9c6e11bc authored by karishma.anupuru's avatar karishma.anupuru

Update main.py

parent a26a6f14
Pipeline #37777 failed with stages
in 2 seconds
print("hello world") from fastapi import FastAPI
\ No newline at end of file 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=8082)
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