title: can't connect to mongolab with node.js on heroku
body: <p>I am having trouble making node.js and mongodb with mongolab work on heroku. I have read other issues like <a href="https://stackoverflow.com/questions/16660519/how-do-i-setup-mongodb-database-on-heroku-with-mongolab">How do I setup MongoDB database on Heroku with MongoLab?</a> and <a href="https://stackoverflow.com/questions/10656574/how-to-manage-mongodb-connections-in-a-nodejs-webapp">How do I manage MongoDB connections in a Node.js web application?</a> but I still can not set up my connection. In the logs it says [Error: failed to connect to ...]</p>
  
  <p>I have takend the db, host and port from the MONGOLAB_URI process env.I have the following code:</p>
  
  <pre><code>var mongoUri = mongodb://heroku_app17328644:{password}@ds037518.mongolab.com //taken from process.env.MONGOLAB_URI 
  
  var host = 'mongodb://heroku_appXXXXXX:{password}@ds037518.mongolab.com';
  var port = '37518';
  var database = 'heroku_appXXXXXX';
  
  Provider.db = new Db(database, new Server(host, port, { safe: true }, { auto_reconnect: true }, {}));
  Provider.db.open(function(err, db){
  console.log(db); //null
  if (err) console.log(err);
  else console.log('success');
  });
  </code></pre>
  
  <p>What am I doing wrong ?</p>