Skip to content

Commit

Permalink
Add healthcheck route
Browse files Browse the repository at this point in the history
  • Loading branch information
alangrainger committed Oct 31, 2024
1 parent bb013bf commit e23a5dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ app.get('/:type(photo|video)/:key/:id', async (req, res) => {
res.status(404).send()
})

// Healthcheck
app.get('/healthcheck', (_req, res) => {
res.send('ok')
})

// Send a 404 for all other routes
app.get('*', (req, res) => {
log('Invalid route ' + req.path)
Expand Down

0 comments on commit e23a5dc

Please sign in to comment.