Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Fix health check endpoint #195

Merged
merged 1 commit into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const routes = require('./routes');
const logger = require('./common/logger');
const errors = require('./common/errors');
const constants = require('./common/constants');
const {getAppHealth} = require('./controllers/AppHealthController');

const app = express();
app.use(cors());
Expand Down Expand Up @@ -117,6 +118,8 @@ _.forEach(routes, (verbs, path) => {
});
});

app.get(`/api/${config.API_VERSION}/health`, getAppHealth);

// static content
app.use(express.static(Path.join(__dirname, 'public')));
// mount the angular app
Expand Down
6 changes: 0 additions & 6 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,4 @@ module.exports = {
method: 'getAppConfig',
},
},
'/health': {
get: {
controller: 'AppHealthController',
method: 'getAppHealth',
},
},
};