prefix-nano

0.1.1 • Public • Published

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");

Readme

Keywords

Package Sidebar

Install

npm i prefix-nano

Weekly Downloads

0

Version

0.1.1

License

ISC

Last publish

Collaborators

  • cubeio