Remove the need of require('loopback')
This commit is contained in:
parent
3a8ccdac8b
commit
38d15cb1dd
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 = path.join(__dirname, 'node_modules',
|
||||
'swagger-ui', 'dist');
|
||||
|
@ -27,12 +26,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