From 38e6d21585e89959f36ef7ccb097dfcdaf13d433 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sat, 5 Sep 2026 20:36:57 -0400 Subject: [PATCH] feat(health): add unauthenticated GET /health endpoint Returns 200 { status: 'ok' } for container healthchecks and monitoring. Placed before all /api/* routes so it bypasses auth; intentionally static with no DB dependency so the container reports healthy whenever the process is serving. --- app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.js b/app.js index bc3e532..50dc932 100644 --- a/app.js +++ b/app.js @@ -43,6 +43,8 @@ const limiter = rateLimit({ app.use(express.json(), cookieParser(), morgan('dev'), mongoSanitize(), helmet(), xss(), limiter, hpp(), cors()) +app.get('/health', (req, res) => res.status(200).json({ status: 'ok' })) + app.use('/api/admin/games', adminGames) app.use('/api/games', games) app.use('/api/tags', tags)