From 4e71ec844b001f32c3fd0009c42904bed14e7a13 Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 28 Jul 2026 16:26:49 -0500 Subject: [PATCH] feat: add /healthz liveness endpoint for container healthcheck --- server/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/index.js b/server/index.js index 3bbc57a..814c680 100644 --- a/server/index.js +++ b/server/index.js @@ -47,6 +47,10 @@ app.use('/static', express.static(STATIC_PATH)); app.use('/uploads', (_req, res) => res.status(404).json({ error: 'Upload not found' })); app.use('/static', (_req, res) => res.status(404).json({ error: 'Static asset not found' })); +// Liveness probe for the container HEALTHCHECK (note: /api/health is the +// dog health-records API, not a status endpoint) +app.get('/healthz', (_req, res) => res.json({ status: 'ok' })); + // ── API Routes ────────────────────────────────────────────────────────── app.use('/api/dogs', require('./routes/dogs')); app.use('/api/litters', require('./routes/litters'));