feat: add /health endpoint to check API is up
This commit is contained in:
parent
392535ecdf
commit
e123b9e1ec
2 changed files with 7 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "eolas-api",
|
||||
"version": "0.2.2",
|
||||
"version": "0.3.0",
|
||||
"description": "API for querying eolas-db, my Zettelkasten database",
|
||||
"license": "ISC",
|
||||
"author": "Thomas Bishop",
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue