Skip to content

Commit

Permalink
🚀 Add root URL endpoint and message for API Welcome.
Browse files Browse the repository at this point in the history
  • Loading branch information
FahimFBA committed Oct 24, 2024
1 parent 2b9daa8 commit 852e7aa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@
allow_headers=["*"],
)

# Accessing the root URL


@app.get("/")
async def root():
return {"message": "Welcome to the Vehicle Allocation API. For going to swagger, add '/docs' after http://127.0.0.1:8000/"}

# Health Check endpoint


@app.get("/health", tags=["Health"])
async def health_check():
return {"status": "healthy"}
Expand Down

0 comments on commit 852e7aa

Please sign in to comment.