git clone git://github.com/creationix/nvm.git ~/.nvm source ~/.nvm/nvm.sh
vim README.md
npm initガイドに従って入力していってください。
vim package.jsondependenciesを以下のように変更してください。
"dependencies": { "headless-byteball": "git+https://github.com/byteball/headless-byteball.git", "byteballcore": "git+https://github.com/byteball/byteballcore.git", "bitcore-lib": "^0.13.14", "bitcore-mnemonic": "~1.0.0", "json-rpc2": "^1.0.2" }npmのモジュールを一括取得
npm install
vim conf.js以下の内容を書き込んで保存する。
/*jslint node: true */ "use strict"; //exports.port = 6611; //exports.myUrl = 'wss://mydomain.com/bb'; exports.bServeAsHub = false; exports.bLight = false; exports.storage = 'sqlite'; exports.hub = 'byteball.org/bb'; exports.deviceName = 'Headless'; //ランダムな文字列。ペアリングコードの一部になる exports.permanent_pairing_secret = '0000'; //チャットを許可するデバイスのアドレスを設定 exports.control_addresses = ['']; exports.payout_address = 'WHERE THE MONEY CAN BE SENT TO'; exports.KEYS_FILENAME = 'keys.json'; // where logs are written to (absolute path). Default is log.txt in app data directory //exports.LOG_FILENAME = '/dev/null'; // consolidate unspent outputs when there are too many of them. Value of 0 means do not try to consolidate exports.MAX_UNSPENT_OUTPUTS = 0; exports.CONSOLIDATION_INTERVAL = 3600*1000; // this is for runnining RPC service only, see play/rpc_service.js exports.rpcInterface = '127.0.0.1'; exports.rpcPort = '6332'; console.log('finished headless conf');
node --inspect-brk あなたのソースファイル名.js
chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/04969c6c-a3c8-4d65-9787-9f8f864ab660