Remove the need of require('loopback')
This commit is contained in:
parent
a900a721ba
commit
02b0892b15
5
index.js
5
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) {
|
||||
|
|
Loading…
Reference in New Issue