Skip to content

Commit ab41757

Browse files
committed
feat: add health check route + add more information at /version
1 parent 5f0bcc5 commit ab41757

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/server.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ app.get("/", (req, res) => {
1111
app.get('/version', (_req, res) => {
1212
const version = process.env.APP_IMAGE_VERSION || 'NOT_DEFINED'
1313

14-
res.json({ version })
14+
res.json({ version: `CURRENT VERSION: ${version}` })
15+
});
16+
17+
app.get('/health', (_req, res) => {
18+
res.json({ status: 'UP' })
1519
});
1620

1721
app.listen(port, () => {

0 commit comments

Comments
 (0)