From d6badafeb9c3b82d9522bc1cbc39243f0654ac2a Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Sun, 30 Nov 2025 15:08:18 +0100 Subject: [PATCH] Added Health Endpoint --- src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 24644a2..37a4e55 100644 --- a/src/index.ts +++ b/src/index.ts @@ -44,9 +44,7 @@ async function main() { await initMailer(); await initS3(); - app.get('/health', async (req, res) => { - return res.send({ status: 'ok' }) - }) + /*app.addHook("onRequest", (req, reply, done) => { console.log("Incoming:", req.method, req.url, "Headers:", req.headers) @@ -66,6 +64,10 @@ async function main() { done() }) + app.get('/health', async (req, res) => { + return res.send({ status: 'ok' }) + }) + //Plugin nur auf bestimmten Routes await app.register(queryConfigPlugin, { routes: ['/api/resource/:resource/paginated']