Liveness probe
const url = 'https://example.com/healthz';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/healthzReturns 200 OK with a fixed shape. No authentication required. Used by Docker, Kubernetes, and reverse proxies to decide whether the backend is up. Has zero dependencies — does not touch the database, the printer queue, SNMP, or any integration. sse_active_subscribers reflects the current EventBus subscriber count; zero means no live SSE clients or the bus is uninitialised.
Responses
Abschnitt betitelt „Responses“Successful Response
Response body of /healthz.
Intentionally minimal — no dependencies, no configuration, no PII.
Container orchestrators check the HTTP status and read the JSON for
a quick version sanity-check; ops use the build-info fields to confirm
which image is running without digging through docker inspect.
Frozen so callers can’t accidentally mutate the response model in-place
(the same immutability discipline we apply to dataclasses — see
docs/learnings/code-review-patterns.md).
object
Example
{ "sse_active_subscribers": 0}