Created
January 8, 2016 04:56
-
-
Save nmarley/4d08d667b0d9b0e9696e to your computer and use it in GitHub Desktop.
Example usage of node-coind
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util = require('util') | |
var coind = require('node-coind') | |
var client = new coind.Client({ | |
host: 'localhost', | |
port: 9998, // production = 9998 | |
user: process.env.DARKCOINRPC_USER, | |
pass: process.env.DARKCOINRPC_PASS | |
}) | |
var cb = function (err, data) { | |
if (err) throw err; | |
//console.log(data); | |
console.log( util.inspect(data, false, null) ); | |
} | |
var args = process.argv.slice(2) | |
args.push(cb) | |
// example usage: node dash.js getinfo | |
// node dash.js masternode list | |
client.cmd.apply(client, args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment