Add healthcheck endpoint

This commit is contained in:
Codex
2026-07-01 12:22:44 +03:00
parent 5e0e8f73c5
commit 60552ed838

View File

@@ -22,7 +22,7 @@ const server = http.createServer((request, response) => {
const url = new URL(request.url, `http://${request.headers.host || 'localhost'}`); 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' }); sendJson(response, 200, { status: 'ok' });
return; return;
} }