Skip to content

Commit

Permalink
add healthy check
Browse files Browse the repository at this point in the history
Signed-off-by: cbh778899 <[email protected]>
  • Loading branch information
cbh778899 committed Jul 29, 2024
1 parent a7a1e20 commit 3ab693a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions healthy-check.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
await fetch('http://localhost:8000/healthy');
console.log('Healthy check passed.')
4 changes: 4 additions & 0 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ function indexRoute() {
res.sendFile(`${process.cwd()}/doc.html`);
})

router.get('/healthy', (_, res)=>{
res.status(200).send('ok')
})

return router;
}

Expand Down

0 comments on commit 3ab693a

Please sign in to comment.