Adding proxy to config, and closing on error

This commit is contained in:
Richard Ramos 2018-06-08 16:59:33 -04:00
parent c9a2014ac7
commit a669538e70
3 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,10 @@ exports.serve = function(ipc, host, port, ws){
ws: ws
});
proxy.on('error', function (err, req, res) {
proxy.close();
});
proxy.on('proxyRes', (proxyRes) => {
let resBody = [];
proxyRes.on('data', (b) => resBody.push(b));

View File

@ -12,6 +12,7 @@
"rpcHost": "localhost",
"rpcPort": 8545,
"rpcCorsDomain": "auto",
"proxy": true,
"account": {
"password": "config/development/password"
},

View File

@ -12,6 +12,7 @@
"rpcHost": "localhost",
"rpcPort": 8545,
"rpcCorsDomain": "auto",
"proxy": true,
"account": {
"password": "config/development/password"
},