Skip to content

Commit ac21bba

Browse files
committed
feat: 헬스 체크 API 추가
1 parent f893818 commit ac21bba

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .views import v1_router as router
2+
3+
__all__ = ["router"]

waffledotcom/src/apps/health/views.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from fastapi import APIRouter
2+
3+
v1_router = APIRouter(prefix="/v1/health", tags=["batch"])
4+
5+
6+
@v1_router.get("/")
7+
def health_check():
8+
# 현재로서는 추가로 체크할 게 없으므로 서버만 살아있는지 확인
9+
return {"status": "OK"}

waffledotcom/src/apps/router.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from fastapi.routing import APIRouter
22

3-
from waffledotcom.src.apps import batch, user
3+
from waffledotcom.src.apps import batch, health, user
44

55
api_router = APIRouter(prefix="/api")
66
api_router.include_router(user.router)
77
api_router.include_router(batch.router)
8+
api_router.include_router(health.router)

0 commit comments

Comments
 (0)