My web app (built on Node.js and Express) works fine locally, but when I deploy it to Heroku, I\'m unable to connect to my Mongo Labs database. I\'ve changed the connection
I answered this in the comments on my tutorial, but I'll answer it here too: I think it's likely that you need to use the environment variable referenced in the Heroku ducomentation you linked: process.env.MONGOLAB_URI ... my guess is that Heroku doesn't want you putting your username/password directly into the code (and with good reason, since that's not particularly secure). Give it a shot with:
var db = mongo.db(process.env.MONGOLAB_URI, {native_parser:true});
and see how that works out.