mirror of https://github.com/embarklabs/embark.git
Adding proxy to config, and closing on error
This commit is contained in:
parent
87a49900b4
commit
ba092d277a
|
@ -14,6 +14,10 @@ exports.serve = function(ipc, host, port, ws){
|
||||||
ws: ws
|
ws: ws
|
||||||
});
|
});
|
||||||
|
|
||||||
|
proxy.on('error', function (err, req, res) {
|
||||||
|
proxy.close();
|
||||||
|
});
|
||||||
|
|
||||||
proxy.on('proxyRes', (proxyRes) => {
|
proxy.on('proxyRes', (proxyRes) => {
|
||||||
let resBody = [];
|
let resBody = [];
|
||||||
proxyRes.on('data', (b) => resBody.push(b));
|
proxyRes.on('data', (b) => resBody.push(b));
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"rpcHost": "localhost",
|
"rpcHost": "localhost",
|
||||||
"rpcPort": 8545,
|
"rpcPort": 8545,
|
||||||
"rpcCorsDomain": "auto",
|
"rpcCorsDomain": "auto",
|
||||||
|
"proxy": true,
|
||||||
"account": {
|
"account": {
|
||||||
"password": "config/development/password"
|
"password": "config/development/password"
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"rpcHost": "localhost",
|
"rpcHost": "localhost",
|
||||||
"rpcPort": 8545,
|
"rpcPort": 8545,
|
||||||
"rpcCorsDomain": "auto",
|
"rpcCorsDomain": "auto",
|
||||||
|
"proxy": true,
|
||||||
"account": {
|
"account": {
|
||||||
"password": "config/development/password"
|
"password": "config/development/password"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue