A Promise based ES6 library that provides an easy way to interact with CouchDB
Via NPM or yarn
npm install couchdb.js yarn add couchdb.js
v1.1.0: On versions 1.1.0 and higher, all functions are OOP and attached to props on CouchClient. couch.listDatabases() => couch.databases.list(), etc.
couchdb.js exports a constructor that accepts an object with properties
port. These should point to your couchdb server. They default to http, localhost and 3000 respectively.
// EXAMPLE// Server points to localhost:5984const CouchClient = ;// initialize the databaseconst db =port: 5984;
NOTE: Databases act like tables, and documents act like keys.
Creating a database
Deleting a database
Creating a document
// first arg accepts the name of the database// second takes in the ID// third is the data to storedbdatabases;
Getting a document
To contribute to this package, fork the source and create pull requests. Be sure to follow the ESLint rules and code style.