mongodb-url

MongoDB URL parsing.


Keywords
compass-tools, mongodb-uri, mongodb-url, url
License
Apache-2.0
Install
npm install mongodb-url@2.0.0

Documentation

mongodb-url

How MongoDB URL's work.

Example

var parse = require('mongodb-url');
parse('localhost:27017')
>>> { dbName: 'admin', servers: [ { host: 'localhost', port: 27017 } ] }
parse('mongodb://localhost:27017')
>>> { dbName: 'admin', servers: [ { host: 'localhost', port: 27017 } ] }

Install

npm install --save mongodb-url

Test

npm test

License

Apache 2