src/http/healthz.ts — Liveness probe
GET /healthz returns {"ok": true} with application/json. Used by:
- nginx (could be wired into upstream health checks if needed)
- systemd post-start verification (
curl -sf https://bot.app.deneva.io/healthz) - the deploy runbook checklist (ops/deploy.md)
Scope
Phase 1: liveness only — the process is running and Fastify is responding. No dependency checks.
Later phases (per design-overview.md) will extend the response with DB connectivity and uptime. Keep this endpoint cheap — it’s hit by external probes, so anything beyond a JSON literal needs to be deliberate.
Tests
test/unit/healthz.test.ts — 200, body, content-type.