feat: add /health endpoint to check API is up
All checks were successful
Deploy eolas-api / deploy (push) Successful in 40s
All checks were successful
Deploy eolas-api / deploy (push) Successful in 40s
This commit is contained in:
parent
392535ecdf
commit
88c3add4ad
1 changed files with 6 additions and 2 deletions
|
|
@ -14,6 +14,10 @@ app.use("/entries", entries)
|
||||||
app.use("/tags", tags)
|
app.use("/tags", tags)
|
||||||
|
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
console.info(`TB-INFO eolas-api running on NodeJS ${process.version}`)
|
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 server running at http://localhost:${port}`)
|
||||||
|
})
|
||||||
|
|
||||||
|
app.get("/health", (req, res) => {
|
||||||
|
res.status(200).json({ status: ok })
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue