aboutsummaryrefslogtreecommitdiffstats
path: root/example/node-app.js
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-27 16:36:39 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-27 16:36:39 +0800
commit1f5a6f13419415b4c05519e126eedcdf815aff7c (patch)
treede2d9551d3746ab3e4c8c38501ae0a1b6eac09d5 /example/node-app.js
parentd223ac0379c4c1f8c209e777ec9ed63384590157 (diff)
parentda4c2d530d6f9b8ba54221c6812f77766a33fed6 (diff)
downloadgo-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar
go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.gz
go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.bz2
go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.lz
go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.xz
go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.tar.zst
go-tangerine-1f5a6f13419415b4c05519e126eedcdf815aff7c.zip
Merge branch 'develop' into cpp
Conflicts: dist/ethereum.js.map dist/ethereum.min.js
Diffstat (limited to 'example/node-app.js')
-rw-r--r--example/node-app.js18
1 files changed, 7 insertions, 11 deletions
diff --git a/example/node-app.js b/example/node-app.js
index f63fa9115..8c2fc0ba3 100644
--- a/example/node-app.js
+++ b/example/node-app.js
@@ -1,16 +1,12 @@
#!/usr/bin/env node
-require('es6-promise').polyfill();
-
var web3 = require("../index.js");
-web3.setProvider(new web3.providers.HttpRpcProvider('http://localhost:8080'));
+web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080'));
+
+var coinbase = web3.eth.coinbase;
+console.log(coinbase);
+
+var balance = web3.eth.balanceAt(coinbase);
+console.log(balance);
-web3.eth.coinbase.then(function(result){
- console.log(result);
- return web3.eth.balanceAt(result);
-}).then(function(balance){
- console.log(web3.toDecimal(balance));
-}).catch(function(err){
- console.log(err);
-}); \ No newline at end of file