monconn

parse and use mongodb connectionstrings

monconn

parse and use mongodb connectionstrings

$ npm install monconn
var monconn = require('monconn');

a = monconn.parse('mongodb:localhost/testDB');

a.db;   // 'testDB'
a.host; // 'localhost'

Use in conjunction with mongodb native driver:

a.connect(require('mongodb'), function (err, db) {
    // do what you like with your connected db object
});

Currently doesn't do anything with querystring options.

MIT. (c) 2012 jden - Jason Denizac jason@denizac.org