A small node module to help deal with an arbitraty url pointing to couchdb.
The goal of this library is to take one couchdb url, and provide as much information as possible about the couchdb that url is pointing to. It uses with the node 'url' module, and possibly some url probing to determine useful couchdb endpoints. Some information might take time to determine, so those methods will have a callback. Once called though, information will be cached so second and subsequent access will be fast.
https://admin:[email protected]/_couch/cool
This is an example of a couch with a vhost on, secure_rewrites=false, and a rewrite to the root couch api as _couch. Cool in this case would be a db
{
couch_root: 'https://me.iriscouch.com/_couch',
db_name: 'cool'
username: 'admin'
password: 'pass'
roles: '_admin',
}
var couch_url = new CouchURLs('https://user:[email protected]/_db');
couch_url.parse(function(err, details){});