Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
exports.registerMiddleware = function registerMiddleware(app, middleware) {
if (
process.env.HOPS_MODE === 'static' &&
Array.isArray(hopsConfig.locations)
) {
hopsConfig.locations.forEach(function(location) {
app.get(location === '/' ? location : location + '*', middleware);
});
} else {
app.all('*', middleware);
}
};
exports.bootstrap = hopsConfig.bootstrapServer || function() {};
exports.teardown = hopsConfig.teardownServer || function() {};
return byType;
},
{ js: [], css: [] }
);
next();
};
exports.timings = hopsConfig.enableServerTimings
? require('server-timings')
: function(req, res, next) {
res.locals.timings = { start: function() {}, end: function() {} };
next();
};
exports.bootstrap = hopsConfig.bootstrapServer || function() {};
exports.teardown = hopsConfig.teardownServer || function() {};