From e23a5dce998d3a009129d3102d49e26ef471c558 Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Thu, 31 Oct 2024 13:21:57 +0100 Subject: [PATCH] Add healthcheck route --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index a0c65cf..7658590 100644 --- a/src/index.ts +++ b/src/index.ts @@ -67,6 +67,11 @@ app.get('/:type(photo|video)/:key/:id', async (req, res) => { res.status(404).send() }) +// Healthcheck +app.get('/healthcheck', (_req, res) => { + res.send('ok') +}) + // Send a 404 for all other routes app.get('*', (req, res) => { log('Invalid route ' + req.path)