Create monitor monitor router

This commit is contained in:
Daniel García Aubert 2018-04-03 19:16:37 +02:00
parent f1e421db05
commit 93bdbb1c50

View File

@ -60,10 +60,14 @@ module.exports = function createServer (serverOptions) {
app.use('/', api); app.use('/', api);
const monitor = express.Router();
const versions = getAndValidateVersions(serverOptions); const versions = getAndValidateVersions(serverOptions);
const serverInfoController = new ServerInfoController(versions); const serverInfoController = new ServerInfoController(versions);
serverInfoController.register(app); serverInfoController.register(monitor);
app.use('/', monitor);
// FIXME: we need a better way to reset cache while running tests // FIXME: we need a better way to reset cache while running tests
if (process.env.NODE_ENV === 'test') { if (process.env.NODE_ENV === 'test') {