Skip to content

healthCheck()

app.healthCheck([pathOrOptions])
NameTypeDescription
pathOrOptionsstring | ObjectCustom path or options object.
// Default endpoint at /health
app.healthCheck();
// Custom path
app.healthCheck("/status");
// With readiness probe
app.healthCheck({
readinessCheck: async () => {
const ok = await db.ping();
return { ok };
}
});

200 OK:

{
"status": "OK",
"uptime": 123.456,
"pid": 12345,
"timestamp": "2025-01-01T00:00:00.000Z"
}

503 Service Unavailable if readiness check fails.