couchdb-create-index

1.1.0 • Public • Published

CouchDB Create Index

Create CouchDB index from object from file or directory.

API

createIndex(url, source[, options], callback)
  • url - CouchDB database URL
  • source - Can be a Couchapp Directory Tree, JSON file or CommonJS/Node module. Please see couchdb-compile for in depth information about source handling.
  • callback - called when done with a response object describing the status of all operations.

Example

var createIndex = require('couchdb-create-index')
createIndex('http://localhost:5984/mydb', 'couchdb/index.json', function(error, response) {
  // here we go
})

CLI

couchdb-create-index URL [SOURCE]

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

Example

couchdb-create-index http://localhost:5984/mydb couchdb/index.json

Tests

npm test

(c) 2018 Johannes J. Schmidt, licensed under Apache-2.0

Readme

Keywords

Package Sidebar

Install

npm i couchdb-create-index

Weekly Downloads

3

Version

1.1.0

License

Apache-2.0

Unpacked Size

5.53 kB

Total Files

9

Last publish

Collaborators

  • jo