Skip to content

Commit

Permalink
feat: add health endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrodrigo19 committed Oct 16, 2024
1 parent d0d3d2d commit e952ea7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/presentation/http/http.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from fastapi import FastAPI

from src.api.presentation.routes.health import health
from src.api.presentation.routes.products import products
from src.api.presentation.routes.cart import cart
from src.api.presentation.routes.client import client
Expand All @@ -7,3 +9,5 @@
app.include_router(products.router, tags=["products"])
app.include_router(client.router, tags=["users"])
app.include_router(cart.router, tags=["cart"])

app.include_router(health.router, tags=["health"])
Empty file.
8 changes: 8 additions & 0 deletions src/api/presentation/routes/health/health.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from fastapi import APIRouter

router = APIRouter()


@router.get("/health")
async def health():
return {"status": "ok"}

0 comments on commit e952ea7

Please sign in to comment.