Hello,
For some reason I'm stuck at trying connecting to the mongolab database.
I've tried with amazon and joyent databases, my connection string matches the mongolab pattern:
Where my username/password match the DATABASE ones not the ACCOUNT.Code:function connect(){ var url = 'mongodb://' + username + ':' + password + address; mongoose.connect(url); }
The error I'm receiving:
I've spent lots of time wrapping my head around this. Please help.Code:c:\authentication>node app Express server listening on port 3000 GET /form 200 5ms events.js:72 throw er; // Unhandled 'error' event ^ Error: failed to connect to [dbh26.mongolab.com:27267] at null.<anonymous> (c:\authentication\node_modules\mongoose\node_modules\mo ngodb\lib\mongodb\connection\server.js:569:74) at EventEmitter.emit (events.js:106:17) at null.<anonymous> (c:\authentication\node_modules\mongoose\node_modules\mo ngodb\lib\mongodb\connection\connection_pool.js:139:15) at EventEmitter.emit (events.js:98:17) at Socket.<anonymous> (c:\authentication\node_modules\mongoose\node_modules\ mongodb\lib\mongodb\connection\connection.js:475:10) at Socket.EventEmitter.emit (events.js:95:17) at net.js:426:14 at process._tickCallback (node.js:415:13)
Thanks.


Reply With Quote

Bookmarks