I am trying to deploy my first app to heroku using mLab MongoDB addon. How should I define the connection?
This is what I found in a NodeJS book, it does not seem to work, though. I replaced the password and database name with appropriate values.
mongoose.connect('mongodb://databasename:[email protected]:10089/app26');
mongoose.connection.on('open', function() {
console.log('Mongoose connected.');
});