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

Fix health check endpoint #196

Merged
merged 1 commit into from
Oct 2, 2019
Merged
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
Fix health check endpoint
ThomasKranitsas committed Oct 2, 2019
commit bfc38d8b1ead4f75189cd62aab875d007f4deef7
3 changes: 3 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -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());
@@ -99,6 +100,8 @@ _.forEach(routes, (verbs, path) => {
});
});

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

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