From 0a2dc7559f7895f50b487cccc5c075fad82bfeab Mon Sep 17 00:00:00 2001 From: Behnam M <58621210+ibehnam@users.noreply.github.com> Date: Tue, 9 Jan 2024 23:30:57 -0500 Subject: [PATCH] added comments on the additional /health endpoint --- examples/server/server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 507031eb6..67d0cfbca 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -2939,8 +2939,8 @@ int main(int argc, char **argv) svr.Get("/health", [&](const httplib::Request&, httplib::Response& res) { - // Perform necessary internal status checks here - // For demonstration purposes, we'll simply return a status of 'ok' + // in real-world applications, it's common to first query the /health endpoint of the server to make sure it's running + // it will return "ok" only after the model is successfully loaded by the server. res.set_content(R"({"status": "ok"})", "application/json"); res.status = 200; // HTTP OK });