feat(backend): add explicit root /health endpoint for Cloud Run checkups
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user