Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

couchdb-bootstrap

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couchdb-bootstrap

Bootstrap projects: configure CouchDB, setup security, deploy ddocs and create users.

  • 1.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
349
increased by12.22%
Maintainers
1
Weekly downloads
 
Created
Source

CouchDB Bootstrap

Bootstrap CouchDB server from CLI or API.

Build
Status

  • Configure CouchDB
  • Create users
  • Create databases (unless they exist)
  • Setup database _security object
  • Deploy design documents
  • Initiate replications
  • Seed documents

CouchDB Bootstrap combines different small tools, which can also be used independently. Each of those tools come has a similar API and is shipped with a CLI:

Directory

Think about CouchDB Bootstrap as a toplevel manager, which reads a directory of databases and optional _config and hands each file over to the appropriate tool:

project/couchdb
├── _config.json
├── _replicator
│   ├── setup-alice.json
│   └── setup-bob.json
├── _users
│   ├── alice.json
│   └── bob.json
├── myapp
│   ├── _design
│   │   └── myapp.js
│   ├── _security.json
│   └── adoc.json
├── myapp-alice
│   └── _security.json
└── myapp-bob
    └── _security.json

In the directory tree above project/couchdb/_config.json is handed to couchdb-configure,
project/couchdb/_replicator/setup-alice.json, project/couchdb/myapp/_design/myapp.js project/couchdb/myapp/adoc.json are handed (beside others) to couchdb-push
and project/couchdb/myapp-alice/_security.json to couchdb-secure.

See couchdb-compile for more details about the CouchDB Filesystem Mapping on a document / security object / config level.

API

bootstrap(url, source[, options], callback)
  • url - CouchDB server URL
  • source - directory holding the bootstrap tree
  • options.multipart - When set to true, attachments are saved via multipart api.
  • callback - called when done with a response object describing the status of all operations.

Example

var bootstrap = require('couchdb-bootstrap')
bootstrap('http://localhost:5984', 'project/couchdb', function(error, response) {
  // here we go
})

CLI

couchdb-bootstrap URL [SOURCE]

When SOURCE is omitted, the current directory will be used.

Example

couchdb-bootstrap http://localhost:5984 project/couchdb

Tests

npm test

Keywords

FAQs

Package last updated on 09 Jun 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc