-
-
Save blakmatrix/5c836186429766815940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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