33 lines
766 B
JavaScript
33 lines
766 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
options: {
|
|
port: 5001,
|
|
hostname: 'localhost',
|
|
base: '<%= accountant.frontend.src %>',
|
|
apiUrl: 'http://localhost:5000/api/',
|
|
livereload: 1337,
|
|
},
|
|
proxies: [{
|
|
context: '/api',
|
|
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 proxy = connectProxy(options.apiUrl);
|
|
|
|
return [
|
|
connectLogger(),
|
|
connect().use('/api', proxy),
|
|
].concat(middlewares);
|
|
}
|
|
}
|
|
}
|
|
};
|