|
|
@ -20,18 +20,21 @@ program |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
program |
|
|
|
program |
|
|
|
.option('-p, --port [port]', 'specify port') |
|
|
|
.command('start') |
|
|
|
.option('-b, --ip [host]', 'specify host') |
|
|
|
.option('-p, --port [port]', 'specify port', 8545) |
|
|
|
.option('-c, --coinbase [coinbase]', 'specify host') |
|
|
|
.option('-b, --ip [host]', 'specify host', '127.0.0.1') |
|
|
|
.option('--rpc', 'run rpc server only') |
|
|
|
.option('-c, --coinbase [coinbase]', 'specify coinbase', '0x0000000000000000000000000000000000000000') |
|
|
|
.option('--details', 'display payloads for every requests and their responses') |
|
|
|
.option('--rpc', 'run rpc server only', true) |
|
|
|
.parse(process.argv) |
|
|
|
.option('--details', 'display payloads for every requests and their responses', false) |
|
|
|
|
|
|
|
.action(() => { |
|
|
|
|
|
|
|
const Server = require('../src/server') |
|
|
|
|
|
|
|
const server = new Server({ |
|
|
|
|
|
|
|
coinbase: program.coinbase, |
|
|
|
|
|
|
|
rpc: program.rpc, |
|
|
|
|
|
|
|
logDetails: program.details |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
server.start(program.host, program.port) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const Server = require('../src/server') |
|
|
|
program.parse(process.argv) |
|
|
|
const server = new Server({ |
|
|
|
|
|
|
|
coinbase: program.coinbase || "0x0000000000000000000000000000000000000000", |
|
|
|
|
|
|
|
rpc: program.rpc, |
|
|
|
|
|
|
|
logDetails: program.details |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
server.start(program.host || '127.0.0.1', program.port || 8545) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|