feat: add logging for health check results and PostgreSQL connection status

This commit is contained in:
Giuseppe Raffa
2026-04-14 12:33:35 +02:00
parent e003770187
commit 063fccfaea
2 changed files with 3 additions and 0 deletions

View File

@@ -23,6 +23,8 @@ app.get('/health', async (req, res) => {
const allOk = Object.values(postgres).every(s => s === 'connected') && influx && minio;
console.log("Health check results:", { postgres, influx: influx ? 'connected' : 'disconnected', minio: minio ? 'connected' : 'disconnected' });
res.json({
status: allOk ? "ok" : "degraded",
service: "api",