added /health endpoint to the server
This commit is contained in:
parent
4f56458d34
commit
d17debd2c7
1 changed files with 7 additions and 1 deletions
|
@ -2938,7 +2938,13 @@ 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'
|
||||
res.set_content(R"({"status": "ok"})", "application/json");
|
||||
res.status = 200; // HTTP OK
|
||||
});
|
||||
|
||||
svr.Get("/v1/models", [¶ms](const httplib::Request&, httplib::Response& res)
|
||||
{
|
||||
std::time_t t = std::time(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue