Commit 3a0b7e3c authored by gyanprakash.keshari's avatar gyanprakash.keshari

Add new file

parent c093e80c
from fastapi import FastAPI
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=8080)
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