# then-couchdb **Repository Path**: mirrors_mjackson/then-couchdb ## Basic Information - **Project Name**: then-couchdb - **Description**: A promise-based CouchDB client for node.js - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-05-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README then-couchdb ============ [then-couchdb](https://github.com/mjijackson/then-couchdb) is a promise-based [CouchDB](http://couchdb.apache.org) client for [node.js](http://nodejs.org). It supports all the features of CouchDB in a simple, user-friendly package. ### Usage Creating a client. ```js var couchdb = require('then-couchdb'); var db = couchdb.createClient('http://localhost:5984/my-database'); ``` Save and fetch a single document. ```js db.save({ name: 'one' }).then(function (doc) { assert(doc); assert(doc._id); assert(doc._rev); db.get(doc._id).then(function (doc) { assert(doc); assert.equal(doc.name, 'one'); }); }); ``` Save and fetch many documents in bulk. ```js db.saveAll([ { name: 'one' }, { name: 'two' }, { name: 'three' } ]).then(function (docs) { assert(Array.isArray(docs)); assert.equal(docs.length, 3); var keys = docs.map(function (doc) { return doc._id; }); db.getAll(keys).then(function (docs) { assert(Array.isArray(docs)); assert.equal(docs.length, 3); }); }); ```