1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

hoist require

This commit is contained in:
sveisvei 2016-11-13 15:31:28 +01:00 committed by Ivar Conradi Østhus
parent dfce071ce0
commit 8e9166add7

3
app.js
View File

@ -9,6 +9,7 @@ const log4js = require('log4js');
const logger = require('./lib/logger');
const routes = require('./lib/routes');
const path = require('path');
const errorHandler = require('errorhandler');
module.exports = function (config) {
const app = express();
@ -47,7 +48,7 @@ module.exports = function (config) {
app.use(baseUriPath, router);
if (process.env.NODE_ENV !== 'production') {
app.use(require('errorhandler')());
app.use(errorHandler());
}
return app;