Commit ed40d1a0 authored by madhuri.penikalapati's avatar madhuri.penikalapati

Update main.py

parent 76979cfc
import logging
import uvicorn
from fastapi import FastAPI from fastapi import FastAPI
app = FastAPI() app = FastAPI()
@app.get("/") @app.get("/")
def read_root(): def read_root():
return {"message": "Hello, FastAPI!"} return {"message": "Hello, World!"}
if __name__ == "__main__":
bind = "0.0.0.0" # Change this to your desired bind address (e.g., "127.0.0.1")
port = 8000 # Change this to your desired port number
logging.info(f"App Starting at {bind}:{port}")
uvicorn.run("main:app", host=bind, port=port)
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