Add /swaggerui context in connect proxy.
This commit is contained in:
parent
88f9163dc1
commit
ffc5ede6ca
@ -6,6 +6,7 @@ module.exports = {
|
||||
hostname: 'localhost',
|
||||
base: '<%= accountant.frontend.src %>',
|
||||
apiUrl: 'http://localhost:5000/api/',
|
||||
swaggerUiUrl: 'http://localhost:5000/swaggerui/',
|
||||
livereload: 1337,
|
||||
},
|
||||
proxies: [{
|
||||
@ -13,6 +14,11 @@ module.exports = {
|
||||
host: '127.0.0.1',
|
||||
port: 5000,
|
||||
https: false
|
||||
}, {
|
||||
contect: '/swaggerui',
|
||||
host: '127.0.0.1',
|
||||
port: 5000,
|
||||
https: false
|
||||
}],
|
||||
livereload: {
|
||||
options: {
|
||||
@ -20,11 +26,13 @@ module.exports = {
|
||||
middleware: function(connect, options, middlewares) {
|
||||
var connectLogger = require('connect-logger');
|
||||
var connectProxy = require('connect-proxy-layer');
|
||||
var proxy = connectProxy(options.apiUrl);
|
||||
var apiProxy = connectProxy(options.apiUrl);
|
||||
var swaggerUiProxy = connectProxy(options.swaggerUiUrl);
|
||||
|
||||
return [
|
||||
connectLogger(),
|
||||
connect().use('/api', proxy),
|
||||
connect().use('/api', apiProxy),
|
||||
connect().use('/swaggerUi', swaggerUiProxy),
|
||||
].concat(middlewares);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user