0.1.1 • Published 9 years ago

prefix-nano v0.1.1

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

prefix-nano

Adds the ability to prefix nano-connections. What does that mean? Well, there will be an optional argument when establishing database connection:

var db = require("prefix-nano")(url[, prefix]);

What happens if a prefix is added? It is basically prepended to all database names requested through that connection. So we can do this to get a connection to the "voizee_dialplans"-database:

var db = require("nano")(url, "voizee");
var dialplanDb = couchDb.use("dialplans");