I have tried everything to get this to connect - I substituted the real username and password instead of MONGOLAB_URI and that didn't work and I've tried what I have below and it still doesn't connect
var http = require ('http');
var mongoose = require('mongoose');
var uristring =
process.env.MONGOLAB_URI ||
process.env.MONGOHQ_URL ||
'mongodb://localhost/clioflict';
// Makes connection asynchronously. Mongoose will queue up database
// operations and release them when the connection is complete.
mongoose.connect(uristring, function (err, res) {
if (err) {
console.log ('ERROR connecting to: ' + uristring + '. ' + err);
} else {
console.log ('Succeeded connected to: ' + uristring);
}
});
This is the error message:
Error: Error connecting to database 2013-11-25T02:04:02.076149+00:00 app[web.1]: throw new Error('Error connecting to database <' + err + '>');
Any Suggestions?