diff --git a/pkgs/clan-cli/clan_cli/webui/app.py b/pkgs/clan-cli/clan_cli/webui/app.py new file mode 100644 index 00000000..52de7cc1 --- /dev/null +++ b/pkgs/clan-cli/clan_cli/webui/app.py @@ -0,0 +1,7 @@ +from fastapi import FastAPI + +from .routers import health, root + +app = FastAPI() +app.include_router(health.router) +app.include_router(root.router) diff --git a/pkgs/clan-cli/clan_cli/webui/routers/__init__.py b/pkgs/clan-cli/clan_cli/webui/routers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pkgs/clan-cli/clan_cli/webui/routers/health.py b/pkgs/clan-cli/clan_cli/webui/routers/health.py new file mode 100644 index 00000000..d734e121 --- /dev/null +++ b/pkgs/clan-cli/clan_cli/webui/routers/health.py @@ -0,0 +1,8 @@ +from fastapi import APIRouter + +router = APIRouter() + + +@router.get("/health") +async def health() -> str: + return "OK" diff --git a/pkgs/clan-cli/clan_cli/webui/routers/root.py b/pkgs/clan-cli/clan_cli/webui/routers/root.py new file mode 100644 index 00000000..752b6e72 --- /dev/null +++ b/pkgs/clan-cli/clan_cli/webui/routers/root.py @@ -0,0 +1,9 @@ +from fastapi import APIRouter, Response + +router = APIRouter() + + +@router.get("/") +async def root() -> Response: + body = "