From 68248f40eec96d1dba2de19945a630a4a0868262 Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Sun, 23 Jul 2023 11:40:07 -0400 Subject: [PATCH] Added status endpoint --- source/csgs/http.d | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/csgs/http.d b/source/csgs/http.d index dff3585..bdfbd48 100644 --- a/source/csgs/http.d +++ b/source/csgs/http.d @@ -17,6 +17,10 @@ void startServer() { PathDelegatingHandler handler = new PathDelegatingHandler(); handler.addMapping("POST", "/extracts", &handleExtract); 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); handler.addMapping("/**", fileHandler);