Skip to content

Commit

Permalink
Added missing ping endpoint as used by Kubernetes for liveliness probe (
Browse files Browse the repository at this point in the history
  • Loading branch information
andymarke committed May 12, 2021
1 parent e8532ef commit cf8f8d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration_tests/integration/health.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ context('Healthcheck', () => {
it('Health check page is visible', () => {
cy.request('/health').its('body.healthy').should('equal', true)
})
it('Ping is visible and UP', () => {
cy.request('/ping').its('body.status').should('equal', 'UP')
})
})
5 changes: 5 additions & 0 deletions server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ export default function createApp(userService: UserService): express.Application
res.json(result)
})
})
app.get('/ping', (req, res) =>
res.send({
status: 'UP',
})
)

// GovUK Template Configuration
app.locals.asset_path = '/assets/'
Expand Down

0 comments on commit cf8f8d7

Please sign in to comment.