Skip to content

Commit

Permalink
Fixed a bug where the path to rest.bitcoin.com could not be found, bu…
Browse files Browse the repository at this point in the history
…mps version to 0.1.1
  • Loading branch information
rkalis committed Oct 28, 2018
1 parent b347312 commit 6e34d15
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pitch.key
.vscode
test.js
7 changes: 5 additions & 2 deletions index.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ const chalk = require('chalk');
const clear = require('clear');
const figlet = require('figlet');
const util = require('util');
const _exec = require('child_process').exec;
const _exec = require('child_process').exec;
const exec = util.promisify(_exec);
const path = require('path');

const restApp = path.dirname(require.resolve('rest.bitcoin.com/package.json')) + '/app.js';

const BITBOXSDK = require('bitbox-sdk/lib/bitbox-sdk');
const BITBOX = new BITBOXSDK.default();
Expand Down Expand Up @@ -80,7 +83,7 @@ async function startBitboxApi() {
// delete the pandacash
console.log('Starting BITBOX API at port 3000');

await exec('BITCOINCOM_BASEURL=http://localhost:3000/api/ RPC_BASEURL=http://localhost:18332/ RPC_PASSWORD=regtest RPC_USERNAME=regtest ZEROMQ_PORT=0 ZEROMQ_URL=0 NETWORK=local node ./node_modules/rest.bitcoin.com/app.js');
await exec(`BITCOINCOM_BASEURL=http://localhost:3000/api/ RPC_BASEURL=http://localhost:18332/ RPC_PASSWORD=regtest RPC_USERNAME=regtest ZEROMQ_PORT=0 ZEROMQ_URL=0 NETWORK=local node ${restApp}`);
}

function printPandaMessage() {
Expand Down
19 changes: 2 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pandacash-cli",
"version": "0.1.0",
"description": "The vision of Panda Cash is to make Bitcoin Cash easily accessible to every developer.",
"version": "0.1.1",
"description": "pandacash-cli is a one-click blockchain solution for easier Bitcoin Cash development.",
"main": "index.js",
"scripts": {
"start": "node index.js",
Expand All @@ -13,14 +13,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/panda-cash/panda-cash.git"
"url": "git+https://github.com/panda-suite/pandacash-cli.git"
},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/panda-cash/panda-cash/issues"
"url": "https://github.com/panda-suite/pandacash-cli/issues"
},
"homepage": "https://github.com/panda-cash/panda-cash#readme",
"homepage": "https://github.com/panda-suite/pandacash-cli#readme",
"dependencies": {
"bitbox-sdk": "^2.1.1",
"chalk": "^2.4.1",
Expand Down

0 comments on commit 6e34d15

Please sign in to comment.