Socket
Socket
Sign inDemoInstall

couchdb-creator

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    couchdb-creator

Check for and create dbs on startup


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

couchdb-creator

Utility for dynamically check for, and creating if their existence is doubtful, a specified DB in CouchDB via nano. Intended for stuff like Docker containers where one is unable to create the DB manually via Futon or the like.

Usage

  var nano = require("nano")("http://couchdb:5984");
  var creator = require("couchdb-creator");

  var foo;
  creator(nano, 'foo', function(db){
    foo = db;
  });

With design_doc:

  var nano = require("nano")("http://couchdb:5984");
  var creator = require("couchdb-creator");

  var doc = { "views":
      { "by_name_and_city":
        { "map": function(doc) { emit([doc.name, doc.city], doc._id); } }
      }
    };
  var foo;
  creator(nano, 'foo', {name : 'by_name_and_city', doc : doc}, function(db){
    foo = db;
  });

Keywords

FAQs

Last updated on 26 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc