Skip to content

Instantly share code, notes, and snippets.

@nagyv
Created March 11, 2012 22:46
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 nagyv/2018516 to your computer and use it in GitHub Desktop.
Save nagyv/2018516 to your computer and use it in GitHub Desktop.
Connecting to mongodb using a mongodb:// uri
var Db = require('mongodb').Db;
//...
options.noOpen = true;
myDb = Db.connect(mongouri, options);
// or
options.noOpen = false;
Db.connect(mongouri, options, callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment