From 7c9b7344aa694899d972b525cdfcb182924578b1 Mon Sep 17 00:00:00 2001 From: Ronny Date: Sat, 11 Apr 2026 16:45:39 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Health-Check=20vereinfacht=20=E2=80=93?= =?UTF-8?q?=20kein=20DB-Query=20mehr=20bei=20/health?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verhindert unnötige SELECT 1 Abfragen gegen Supabase alle 30s. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/src/index.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 03ebef9..6a6dcb5 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -6,7 +6,6 @@ import rateLimit from 'express-rate-limit'; import { staffbaseAuth as createStaffbaseAuth } from './middleware/staffbaseAuth'; import { devAuth } from './middleware/devAuth'; -import { checkDbConnection } from './db/client'; import { logger } from './services/logger'; import matchesRouter from './routes/matches'; @@ -110,11 +109,9 @@ app.use( // ============================================================ // Health Check (ohne Auth – für Railway/Render/Uptime-Monitoring) // ============================================================ -app.get('/health', async (_req, res) => { - const dbOk = await checkDbConnection(); - res.status(dbOk ? 200 : 503).json({ - status: dbOk ? 'ok' : 'degraded', - db: dbOk ? 'connected' : 'unreachable', +app.get('/health', (_req, res) => { + res.status(200).json({ + status: 'ok', timestamp: new Date().toISOString(), version: process.env.npm_package_version ?? '1.0.0', });