healthCheck()
Signature
Section titled “Signature”app.healthCheck([pathOrOptions])Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
pathOrOptions | string | Object | Custom path or options object. |
Examples
Section titled “Examples”// Default endpoint at /healthapp.healthCheck();
// Custom pathapp.healthCheck("/status");
// With readiness probeapp.healthCheck({ readinessCheck: async () => { const ok = await db.ping(); return { ok }; }});Response
Section titled “Response”200 OK:
{ "status": "OK", "uptime": 123.456, "pid": 12345, "timestamp": "2025-01-01T00:00:00.000Z"}503 Service Unavailable if readiness check fails.