От драйвера MongoDB 2.0.0 документи
var mongodb = require('mongodb');
var MongoClient = mongodb.MongoClient;
var url = "mongodb://user:[email protected],db2,db3/foo?authSource=admin";
MongoClient.connect(url, function(err, db) {
console.log("Connected correctly to server");
console.log("Current database", db.databaseName);
//db==foo
db.close();
});