Skip to content

Commit

Permalink
core: services: helper: Add root page
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
  • Loading branch information
patrickelectric authored and joaoantoniocardoso committed Nov 26, 2024
1 parent 7f47a81 commit a77382f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/services/helper/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
)
from commonwealth.utils.logs import InterceptHandler, init_logger
from fastapi import FastAPI, HTTPException
from fastapi.responses import HTMLResponse
from fastapi_versioning import VersionedFastAPI, version
from loguru import logger
from pydantic import BaseModel
Expand Down Expand Up @@ -646,6 +647,19 @@ async def periodic() -> None:
enable_latest=True,
)


@app.get("/")
async def root() -> HTMLResponse:
html_content = """
<html>
<head>
<title>Helper</title>
</head>
</html>
"""
return HTMLResponse(content=html_content, status_code=200)


port_to_service_map: Dict[int, str] = parse_nginx_file("/home/pi/tools/nginx/nginx.conf")

if __name__ == "__main__":
Expand Down

0 comments on commit a77382f

Please sign in to comment.