We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f92bd59 commit 88d13a1Copy full SHA for 88d13a1
examples/server/server.cpp
@@ -1024,6 +1024,11 @@ int main(int argc, char ** argv) {
1024
// check if the model is in the file system
1025
});
1026
1027
+ svr.Get(sparams.request_path + "/health", [&](const Request &, Response &res){
1028
+ const std::string health_response = "{\"status\":\"ok\"}";
1029
+ res.set_content(health_response, "application/json");
1030
+ });
1031
+
1032
svr.set_exception_handler([](const Request &, Response &res, std::exception_ptr ep) {
1033
const char fmt[] = "500 Internal Server Error\n%s";
1034
char buf[BUFSIZ];
0 commit comments