Skip to content

Commit e50bfc3

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

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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)