Skip to content

Commit

Permalink
feat: 헬스 체크 API 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
minkyu97 committed Jul 6, 2024
1 parent f893818 commit ac21bba
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions waffledotcom/src/apps/health/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .views import v1_router as router

__all__ = ["router"]
9 changes: 9 additions & 0 deletions waffledotcom/src/apps/health/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fastapi import APIRouter

v1_router = APIRouter(prefix="/v1/health", tags=["batch"])


@v1_router.get("/")
def health_check():
# 현재로서는 추가로 체크할 게 없으므로 서버만 살아있는지 확인
return {"status": "OK"}
3 changes: 2 additions & 1 deletion waffledotcom/src/apps/router.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from fastapi.routing import APIRouter

from waffledotcom.src.apps import batch, user
from waffledotcom.src.apps import batch, health, user

api_router = APIRouter(prefix="/api")
api_router.include_router(user.router)
api_router.include_router(batch.router)
api_router.include_router(health.router)

0 comments on commit ac21bba

Please sign in to comment.