From 38df8e77c7365235795062927f23f23a5fa053f5 Mon Sep 17 00:00:00 2001 From: Plena Finance Dev Date: Thu, 9 Jul 2026 16:11:02 +0530 Subject: [PATCH] feat(backend): add explicit root /health endpoint for Cloud Run checkups --- backend/src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/index.ts b/backend/src/index.ts index 8a5909b..0fc3548 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -20,6 +20,11 @@ app.disable('x-powered-by'); app.use(cors({ origin: config.corsOrigin === '*' ? true : config.corsOrigin })); app.use(express.json({ limit: '1mb' })); +// Root health check for Cloud Run deployment checks +app.get('/health', (req, res) => { + res.status(200).json({ status: 'ok' }); +}); + const apiRoot = config.apiPrefix || '/'; app.use(apiRoot, createHealthRouter(config)); app.use(apiRoot, createTodosRouter(config, db));