41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
options: {
|
|
port: 5001,
|
|
hostname: 'localhost',
|
|
base: '<%= accountant.frontend.src %>',
|
|
apiUrl: 'http://localhost:5000/api/',
|
|
swaggerUiUrl: 'http://localhost:5000/swaggerui/',
|
|
livereload: 1337,
|
|
},
|
|
proxies: [{
|
|
context: '/api',
|
|
host: '127.0.0.1',
|
|
port: 5000,
|
|
https: false
|
|
}, {
|
|
contect: '/swaggerui',
|
|
host: '127.0.0.1',
|
|
port: 5000,
|
|
https: false
|
|
}],
|
|
livereload: {
|
|
options: {
|
|
//open: true,
|
|
middleware: function(connect, options, middlewares) {
|
|
var connectLogger = require('connect-logger');
|
|
var connectProxy = require('connect-proxy-layer');
|
|
var apiProxy = connectProxy(options.apiUrl);
|
|
var swaggerUiProxy = connectProxy(options.swaggerUiUrl);
|
|
|
|
return [
|
|
connectLogger(),
|
|
connect().use('/api', apiProxy),
|
|
connect().use('/swaggerUi', swaggerUiProxy),
|
|
].concat(middlewares);
|
|
}
|
|
}
|
|
}
|
|
};
|