Skip to content

Commit

Permalink
feat: allow custom broker client healthcheck path
Browse files Browse the repository at this point in the history
The broker client healthcheck path can be customised by setting the
BROKER_HEALTHCHECK_PATH environment variable (or providing it in the
`.env` file), to be more accommodating of existing load balancers.
  • Loading branch information
gjvis committed Jun 29, 2017
1 parent 18becc0 commit e894b14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = ({ port = null, config = {}, filters = {} }) => {
const { app, server } = require('../webserver')(config, port);

// IMPORTANT: defined before relay (`app.all('/*', ...`)
app.get('/healthcheck', (req, res, next) => {
app.get(config.brokerHealthcheckPath || '/healthcheck', (req, res) => {
return res.status(200).json({ ok: true });
});

Expand Down

0 comments on commit e894b14

Please sign in to comment.