From c2860f6ff3c3b948f580cc0459d393e3b4351300 Mon Sep 17 00:00:00 2001 From: bramjanssen Date: Thu, 24 Sep 2026 08:28:19 +0200 Subject: [PATCH] feat: added root page --- app/main.py | 10 ++++++++++ tests/test_root.py | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 tests/test_root.py diff --git a/app/main.py b/app/main.py index 42bff85..5a596a7 100644 --- a/app/main.py +++ b/app/main.py @@ -40,6 +40,16 @@ app.middleware("http")(add_correlation_id) register_exception_handlers(app) + +@app.get("/") +async def root(): + return { + "message": f"Welcome to the {settings.app_name}", + "description": settings.app_description, + "version": settings.app_version, + } + + # include routers app.include_router(tiles.router) app.include_router(jobs_status.router) diff --git a/tests/test_root.py b/tests/test_root.py new file mode 100644 index 0000000..0b6136e --- /dev/null +++ b/tests/test_root.py @@ -0,0 +1,4 @@ +def test_root(client): + response = client.get("/") + + assert response.status_code == 200