Skip to content

Commit

Permalink
Make the root API endpoint a health check too
Browse files Browse the repository at this point in the history
  • Loading branch information
halprin committed Oct 4, 2024
1 parent 90576b6 commit 8e01e78
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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);
Expand Down

0 comments on commit 8e01e78

Please sign in to comment.