diff --git a/index.js b/index.js index e71b748..f3a1b61 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,6 @@ var url = require('url'); var path = require('path'); var urlJoin = require('./lib/url-join'); var _defaults = require('lodash.defaults'); -var loopback = require('loopback'); var swagger = require('./lib/swagger'); var SWAGGER_UI_ROOT = require('swagger-ui').dist; var STATIC_ROOT = path.join(__dirname, 'public'); @@ -26,12 +25,12 @@ function explorer(loopbackApplication, options) { apiInfo: loopbackApplication.get('apiInfo') || {} }); + var loopback = loopbackApplication.loopback; var app = loopback(); + app.disable('x-powered-by'); swagger(loopbackApplication, app, options); - app.disable('x-powered-by'); - // config.json is loaded by swagger-ui. The server should respond // with the relative URI of the resource doc. app.get('/config.json', function(req, res) {