Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit a0694da

Browse files
committed
feat: add simple healthcheck
1 parent 92fe6e2 commit a0694da

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

controllers/health.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
void health::asyncHandleHttpRequest(
44
const HttpRequestPtr &req,
55
std::function<void(const HttpResponsePtr &)> &&callback) {
6-
// write your application logic here
76
auto resp = HttpResponse::newHttpResponse();
8-
// NOTE: The enum constant below is named "k200OK" (as in 200 OK), not
9-
// "k2000K".
107
resp->setStatusCode(k200OK);
118
resp->setContentTypeCode(CT_TEXT_HTML);
129
resp->setBody("Nitro is alive!!!");
1310
callback(resp);
14-
// write your application logic here
1511
}

controllers/health.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class health : public drogon::HttpSimpleController<health>
1010
public:
1111
void asyncHandleHttpRequest(const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback) override;
1212
PATH_LIST_BEGIN
13-
// list path definitions here;
1413
PATH_ADD("/healthz", Get);
1514
PATH_LIST_END
1615
};

0 commit comments

Comments
 (0)