From 88c3add4ad47dafdb1741a18cd72aad0dd196051 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Fri, 17 Oct 2025 18:52:06 +0100 Subject: [PATCH] feat: add /health endpoint to check API is up --- src/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index ceffa6e..7a9e20d 100644 --- a/src/index.js +++ b/src/index.js @@ -14,6 +14,10 @@ app.use("/entries", entries) app.use("/tags", tags) app.listen(port, () => { - console.info(`TB-INFO eolas-api running on NodeJS ${process.version}`) - console.info(`TB-INFO eolas-api server running at http://localhost:${port}`) + console.info(`TB-INFO eolas-api running on NodeJS ${process.version}`) + console.info(`TB-INFO eolas-api server running at http://localhost:${port}`) +}) + +app.get("/health", (req, res) => { + res.status(200).json({ status: ok }) })