Add healthcheck endpoint
This commit is contained in:
@@ -22,7 +22,7 @@ const server = http.createServer((request, response) => {
|
||||
|
||||
const url = new URL(request.url, `http://${request.headers.host || 'localhost'}`);
|
||||
|
||||
if (url.pathname === '/ping') {
|
||||
if (url.pathname === '/ping' || url.pathname === '/health' || url.pathname === '/healthcheck') {
|
||||
sendJson(response, 200, { status: 'ok' });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user