Added status endpoint
This commit is contained in:
parent
eebcf0c91a
commit
68248f40ee
|
@ -17,6 +17,10 @@ void startServer() {
|
||||||
PathDelegatingHandler handler = new PathDelegatingHandler();
|
PathDelegatingHandler handler = new PathDelegatingHandler();
|
||||||
handler.addMapping("POST", "/extracts", &handleExtract);
|
handler.addMapping("POST", "/extracts", &handleExtract);
|
||||||
handler.addMapping("GET", "/extracts/{extractId}", &getExtract);
|
handler.addMapping("GET", "/extracts/{extractId}", &getExtract);
|
||||||
|
handler.addMapping("GET", "/status", (ref HttpRequestContext ctx) {
|
||||||
|
ctx.response.setStatus(HttpStatus.OK);
|
||||||
|
ctx.response.writeBodyString("online");
|
||||||
|
});
|
||||||
|
|
||||||
FileResolvingHandler fileHandler = new FileResolvingHandler("site", DirectoryResolutionStrategies.serveIndexFiles);
|
FileResolvingHandler fileHandler = new FileResolvingHandler("site", DirectoryResolutionStrategies.serveIndexFiles);
|
||||||
handler.addMapping("/**", fileHandler);
|
handler.addMapping("/**", fileHandler);
|
||||||
|
|
Loading…
Reference in New Issue