node-bitcoin express rpc I can't get the node-bitcoin rpc module running correctly in my express app... Either I get a connection refused error or I get a invalid params -32602

Here's a little code snipped from my app.js file.  Can somebody help me out on what I'm doing wrong here.  FYI, I do have port 8332 and 8333 open on nginx 

/******* THIS GIVES ME INVALID PARAMS from -32602 ******/
var net = require('net');
var server = net.createServer(function(c) { //'connection' listener
console.log('server connected');
});
server.listen(8332, function() { //'listening' listener
console.log('server bound');
});

var bitcoinClient = new bitcoin.Client({
host: 'localhost',
port: 8332,
user: 'username',
pass: 'password'
});

bitcoinClient.getInfo(function(e, info){
if(e){ return console.log(e);}
});
/****************************************************************/

/******* THIS GIVES ME CONNECTION REFUSED ******/

var bitcoinClient = new bitcoin.Client({
host: 'localhost',
port: 8332,
user: 'username',
pass: 'password'
});

bitcoinClient.getInfo(function(e, info){
if(e){ return console.log(e);}
});
/****
As Murch suggested in comments, I better leave this as an answer.

What I think your problem is that you haven't configured your bitcoin.conf file. You can see all the parameters and explanation of em' thoughtfully provided by the Bitcoin wiki here. See that example bitcoin.conf? It has all the parameters commented out with the # sign. Just uncomment them by removing the hash and fill in your configuration.

To use the api you are going to need server=1 to enable api commands, rpcuser=&lt;username&gt; and rpcpassword=&lt;your secure password to be able to actually connect.

Now test it

It's easy to test your Bitcoind configuration settings with a browser, just load up the address of your Bitcoind in a browser like so: http://127.0.0.1:8332. It should throw a username and password dialog if everything is correct.

Note: You will need to enable rpcallowip=&lt;ip&gt; to allow connections from other than your own machine. This is also really dangerous and I advise against this.