web3.js/example/node-app.js

13 lines
260 B
JavaScript
Raw Normal View History

#!/usr/bin/env node
var web3 = require("../index.js");
2015-03-10 12:27:16 +00:00
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8080'));
var coinbase = web3.eth.coinbase;
console.log(coinbase);
var balance = web3.eth.getBalance(coinbase);
console.log(balance);