Создан пример приложения
This commit is contained in:
2
api/routers/__init__.py
Normal file
2
api/routers/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
"""Application routers package."""
|
||||
|
||||
14
api/routers/health.py
Normal file
14
api/routers/health.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/health")
|
||||
def health() -> dict:
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
@router.get("/")
|
||||
def root() -> dict:
|
||||
return {"message": "FastAPI is running"}
|
||||
|
||||
Reference in New Issue
Block a user