Skip to content

Commit ffe18e4

Browse files
committed
Add healthcheck for render
1 parent 2b9cfb8 commit ffe18e4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
}
1313

1414
group = "tanin.ejwf"
15-
version = "1.0.0-rc1"
15+
version = "1.0.0-rc2"
1616

1717
description = "Embeddable Java Web Framework (EJWF)"
1818

src/main/java/tanin/ejwf/Main.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33

44
import com.renomad.minum.web.FullSystem;
55
import com.renomad.minum.web.Response;
6+
import com.renomad.minum.web.StatusLine;
67

78
import java.io.IOException;
9+
import java.util.Map;
810
import java.util.logging.LogManager;
911
import java.util.logging.Logger;
1012

@@ -49,6 +51,14 @@ public void start() {
4951
return Response.htmlOk(content);
5052
}
5153
);
54+
55+
wf.registerPath(
56+
GET,
57+
"healthcheck",
58+
req -> {
59+
return Response.buildResponse(StatusLine.StatusCode.CODE_200_OK, Map.of("Content-Type", "text/plain"), "OK EWJF");
60+
}
61+
);
5262
}
5363

5464
public void stop() {

0 commit comments

Comments
 (0)