Remove the need of require('loopback')

This commit is contained in:
Raymond Feng 2014-07-25 00:04:52 -07:00
parent a900a721ba
commit 02b0892b15
1 changed files with 2 additions and 3 deletions

View File

@ -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) {