shapi / app.py
sh20raj's picture
Refactor app.py to include user and product routers, update greeting message, and clean up commented code.
ef014d1
raw
history blame contribute delete
412 Bytes
from fastapi import FastAPI
from routers import users, products # Import your routers
app = FastAPI()
# Include routers
app.include_router(users.router, prefix="/users", tags=["Users"])
app.include_router(products.router, prefix="/products", tags=["Products"])
# app.include_router(orders.router, prefix="/orders", tags=["Orders"])
@app.get("/")
def read_root():
return {"message": "Welcome to the API"}