Skip to content

Instantly share code, notes, and snippets.

@benzenwen
Forked from esedor/gist:1368275
Created August 8, 2012 00:58
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 benzenwen/3291079 to your computer and use it in GitHub Desktop.
Save benzenwen/3291079 to your computer and use it in GitHub Desktop.
Connecting to MongoDB in Node.JS
var mongo = require('mongodb');
var mongoUri = 'mongodb://localhost:27017/mongoquest';
mongo.Db.connect(mongoUri, function (err, db) {
/* adventure! */
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment