From 142a05664c8eb4db2ca4a34681b570909eda7ea2 Mon Sep 17 00:00:00 2001 From: sveisvei Date: Sun, 13 Nov 2016 15:31:28 +0100 Subject: [PATCH] hoist require --- app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 4d0d30cd71..3012293841 100644 --- a/app.js +++ b/app.js @@ -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;