mirror of https://github.com/embarklabs/embark.git
boot swarm with spawn
This commit is contained in:
parent
8655b49a39
commit
c86c50fb4e
|
@ -1,4 +1,4 @@
|
|||
const shelljs = require('shelljs');
|
||||
const child_process = require('child_process');
|
||||
const ProcessWrapper = require('../../process/processWrapper');
|
||||
const constants = require('../../constants');
|
||||
|
||||
|
@ -20,16 +20,13 @@ class SwarmProcess extends ProcessWrapper {
|
|||
if (self.webServerConfig && self.webServerConfig && self.webServerConfig.host && self.webServerConfig.port) {
|
||||
corsDomain = `http://${self.webServerConfig.host}:${self.webServerConfig.port}`;
|
||||
}
|
||||
const child = shelljs.exec(
|
||||
`${this.storageConfig.swarmPath || 'swarm'} --bzzaccount ${this.storageConfig.account.address} --password ${this.storageConfig.account.password} --corsdomain ${corsDomain} --ens-api ''`,
|
||||
{silent: true}, (err, _stdout, _stderr) =>
|
||||
{
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit();
|
||||
});
|
||||
const child = child_process.spawn(this.storageConfig.swarmPath || 'swarm',
|
||||
[
|
||||
`--bzzaccount ${this.storageConfig.account.address}`,
|
||||
`--password ${this.storageConfig.account.password}`,
|
||||
`--corsdomain ${corsDomain}`,
|
||||
"--ens-api ''"
|
||||
]);
|
||||
let lastMessage;
|
||||
child.stderr.on('data', (data) => {
|
||||
if (!self.readyCalled && data.indexOf('Swarm http proxy started') > -1) {
|
||||
|
|
Loading…
Reference in New Issue