integrate webserver into cli

integrate webserver into cli
This commit is contained in:
Jörg Thalheim
2023-08-23 17:17:34 +02:00
parent 7f6f147d84
commit acc648fc6b
5 changed files with 25 additions and 10 deletions

View File

@@ -0,0 +1,8 @@
from fastapi import APIRouter
router = APIRouter()
@router.get("/health")
async def health() -> str:
return "OK"

View File

@@ -0,0 +1,9 @@
from fastapi import APIRouter, Response
router = APIRouter()
@router.get("/")
async def root() -> Response:
body = "<html><body><h1>Welcome</h1></body></html>"
return Response(content=body, media_type="text/html")