diff options
author | makefu <makefu@syntax-fehler.de> | 2011-06-23 01:11:50 +0200 |
---|---|---|
committer | makefu <makefu@syntax-fehler.de> | 2011-06-23 01:11:50 +0200 |
commit | 0ba0ca5efa18485a95005a4c22891b0c4927e732 (patch) | |
tree | f27c9df8f9ccf6aa78a7cdbc55e1cac78c50d398 /btcguild/index.js | |
parent | efee2013940fa4c57ec3b1ae046e64036864cc46 (diff) | |
parent | 8f900fff02ac22ba87c35e6745af11c0b8d98855 (diff) |
merged Makefile, install lmsensors AND tmux
Diffstat (limited to 'btcguild/index.js')
-rw-r--r-- | btcguild/index.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/btcguild/index.js b/btcguild/index.js new file mode 100644 index 00000000..1f33db06 --- /dev/null +++ b/btcguild/index.js @@ -0,0 +1,20 @@ +api_key = process.env.api_key; + +var options = { + host: 'www.btcguild.com', + port: 80, + path: '/api.php?api_key=' + api_key +}; + +http = require('http'); +http.get(options, function(res) { + var data = ''; + res.on('data', function (chunk) { + data += chunk; + }); + res.on('end', function () { + console.log(JSON.parse(data)); + }); +}).on('error', function(e) { + console.error('Error: ' + e.message); +}); |