diff --git a/src/categories/create.js b/src/categories/create.js index 09df61cb07..fc841679d2 100644 --- a/src/categories/create.js +++ b/src/categories/create.js @@ -3,7 +3,6 @@ var async = require('async'); var db = require('../database'); - var groups = require('../groups'); var plugins = require('../plugins'); var utils = require('../../public/src/utils'); diff --git a/src/webserver.js b/src/webserver.js index ec80bf5f17..68ba499858 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -24,7 +24,6 @@ var meta = require('./meta'); var languages = require('./languages'); var logger = require('./logger'); var plugins = require('./plugins'); -var middleware = require('./middleware'); var routes = require('./routes'); var auth = require('./routes/authentication'); var emitter = require('./emitter'); @@ -83,6 +82,8 @@ module.exports.listen = function() { }; function setupExpressApp(app) { + var middleware = require('./middleware'); + var relativePath = nconf.get('relative_path'); app.engine('tpl', templates.__express); @@ -146,7 +147,9 @@ function setupFavicon(app) { } function initializeNodeBB(callback) { - var skipJS, fromFile = nconf.get('from-file') || ''; + var skipJS; + var fromFile = nconf.get('from-file') || ''; + var middleware = require('./middleware'); if (fromFile.match('js')) { winston.info('[minifier] Minifying client-side JS skipped');