From 8e01e789a7ce6aaa0753177882cffd0f7d6b3c6d Mon Sep 17 00:00:00 2001 From: halprin Date: Fri, 4 Oct 2024 08:32:28 -0600 Subject: [PATCH] Make the root API endpoint a health check too --- .../gov/hhs/cdc/trustedintermediary/external/javalin/App.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/gov/hhs/cdc/trustedintermediary/external/javalin/App.java b/app/src/main/java/gov/hhs/cdc/trustedintermediary/external/javalin/App.java index 24e340e35..bc7b1c84f 100644 --- a/app/src/main/java/gov/hhs/cdc/trustedintermediary/external/javalin/App.java +++ b/app/src/main/java/gov/hhs/cdc/trustedintermediary/external/javalin/App.java @@ -38,7 +38,8 @@ public class App { private static final long MAX_REQUEST_SIZE = 2 * 1024 * 1024L; // 2 MB in bytes private static final int PORT = 8080; - static final String HEALTH_API_ENDPOINT = "/health"; + private static final String HEALTH_API_ENDPOINT = "/health"; + private static final String ROOT_API_ENDPOINT = "/"; public static void main(String[] args) { var app = @@ -50,6 +51,7 @@ public static void main(String[] args) { try { app.get(HEALTH_API_ENDPOINT, ctx -> ctx.result("Operational")); + app.get(ROOT_API_ENDPOINT, ctx -> ctx.result("Operational")); registerClasses(); registerDomains(app);