Skip to content

Commit 33d8122

Browse files
fix: add health check endpoint
1 parent 9255486 commit 33d8122

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/release-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release updated
33
on:
44
push:
55
branches:
6-
- swati/updateImages
6+
- wenxing/updateImages
77

88
jobs:
99
BuildDockerImage:
@@ -37,7 +37,7 @@ jobs:
3737
build-args: |
3838
GPR_TOKEN=${{ secrets.GPR_TOKEN }}
3939
tags: |
40-
ghcr.io/eyblockchain/timber-updated:latest
40+
ghcr.io/eyblockchain/multiple-contracts:with-health-check
4141
# username: ${{ github.actor }}
4242
# password: ${{ secrets.GITHUB_TOKEN }}
4343
push: true

merkle-tree/src/routes/node.routes.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@ async function getRoot(req, res, next) {
207207
}
208208
}
209209

210+
async function getHealthCheck(req, res, next) {
211+
try {
212+
res.data = "Ok";
213+
next();
214+
} catch (err) {
215+
next(err);
216+
}
217+
}
218+
219+
210220
// initializing routes
211221
export default function(router) {
212222
// NODE ROUTES
@@ -237,4 +247,5 @@ export default function(router) {
237247
// ROOT ROUTES
238248

239249
router.route('/root').get(getRoot);
250+
router.route('/healthcheck').get(getHealthCheck);
240251
}

0 commit comments

Comments
 (0)