Skip to content

Instantly share code, notes, and snippets.

@blakmatrix
Created February 12, 2013 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blakmatrix/5c836186429766815940 to your computer and use it in GitHub Desktop.
Save blakmatrix/5c836186429766815940 to your computer and use it in GitHub Desktop.
elp: Connect with the `mongo` cli client:
help:
$ mongo linus.mongohq.com:10019/nodejitsudb8883441763 -u nodejitsu -p af3150db161ffabcdc759b582918ec92
help:
help: Connect with the `mongodb-native module`:
help:
var mongodb = require('mongodb');
var db = new mongodb.Db('nodejitsudb8883441763',
new mongodb.Server('linus.mongohq.com', 10019, {})
);
db.open(function (err, db_p) {
if (err) { throw err; }
db.authenticate('nodejitsu', 'af3150db161ffabcdc759b582918ec92', function (err, replies) {
// You are now connected and authenticated.
});
});
help:
help: Connect with the `mongoose` module:
help:
var mongoose = require('mongoose');
mongoose.connect('mongodb://nodejitsu:af3150db161ffabcdc759b582918ec92@linus.mongohq.com:10019/nodejitsudb8883441763');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment