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

Commit 5d9a857

Browse files
authored
Merge pull request #196 from topcoder-platform/fix-healthcheck-endpoint-dev
Fix health check endpoint
2 parents ddd0740 + bfc38d8 commit 5d9a857

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const routes = require('./routes');
2222
const logger = require('./common/logger');
2323
const errors = require('./common/errors');
2424
const constants = require('./common/constants');
25+
const {getAppHealth} = require('./controllers/AppHealthController');
2526

2627
const app = express();
2728
app.use(cors());
@@ -99,6 +100,8 @@ _.forEach(routes, (verbs, path) => {
99100
});
100101
});
101102

103+
app.get(`/api/${config.API_VERSION}/health`, getAppHealth);
104+
102105
// static content
103106
app.use(express.static(Path.join(__dirname, 'public')));
104107
app.use('*', (req, res) => {

src/routes.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,4 @@ module.exports = {
226226
method: 'getAppConfig',
227227
},
228228
},
229-
'/health': {
230-
get: {
231-
controller: 'AppHealthController',
232-
method: 'getAppHealth',
233-
},
234-
},
235229
};

0 commit comments

Comments
 (0)