mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
hoist require
This commit is contained in:
parent
c7de9f084a
commit
142a05664c
3
app.js
3
app.js
@ -9,6 +9,7 @@ const log4js = require('log4js');
|
|||||||
const logger = require('./lib/logger');
|
const logger = require('./lib/logger');
|
||||||
const routes = require('./lib/routes');
|
const routes = require('./lib/routes');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const errorHandler = require('errorhandler');
|
||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
const app = express();
|
const app = express();
|
||||||
@ -47,7 +48,7 @@ module.exports = function (config) {
|
|||||||
app.use(baseUriPath, router);
|
app.use(baseUriPath, router);
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
app.use(require('errorhandler')());
|
app.use(errorHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
|
Loading…
Reference in New Issue
Block a user