Skip to content

Commit

Permalink
Remove modules option
Browse files Browse the repository at this point in the history
- this is no longer needed
  • Loading branch information
mverkerk-godaddy committed Oct 31, 2017
1 parent 29b9569 commit c390bfe
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ try {
'You can copy & edit the sample from: https://www.github.com/godaddy/timings/blob/master/CONFIG.MD\n');
throw err;
}
const config = require('../.config.js');

const app = express();

Expand Down Expand Up @@ -45,18 +44,6 @@ for (const apiVersion of Object.keys(API_VERSIONS)) {
app.use(route + '/api/cicd/', require('../routes' + route + '/post-routes'));
}

// Add extra routes from config.modules
if (config.hasOwnProperty('modules')) {
for (const mod of Object.keys(config.modules)) {
const objMod = config.modules[mod];
if (typeof objMod === 'object') {
const modName = Object.keys(mod)[0].replace(' ', '');
const modPkg = objMod[modName];
logger.info('- adding module [' + modPkg + '] on endpoint /' + modName.replace(' ', '') + '/');
app.use('/api/' + modName.replace(' ', '') + '/', require(modPkg));
}
}
}
// catch 404 and forward to error handler
app.use(function (req, res, next) {
if (req.xhr) {
Expand Down

0 comments on commit c390bfe

Please sign in to comment.