# couchdb-api

> An async wrapper for the CouchDB HTTP API, following Node.js conventions

Latest version **1.2.2** (published 2013-01-12) · 0 weekly downloads

## Install

```sh
npm install couchdb-api
pnpm add couchdb-api
yarn add couchdb-api
bun add couchdb-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2013-01-12 |
| First published | 2011-11-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.6.x \|\| 0.8.x |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 43 |
| Author | Dominic Barnes |
| Maintainers | dominicbarnes |
| Keywords | couchdb, async, nosql, api, http, couch, rest |

## Links

- npm: https://www.npmjs.com/package/couchdb-api
- Repository: https://github.com/dominicbarnes/node-couchdb-api
- Homepage: http://dominicbarnes.us/node-couchdb-api
- npm.io page: https://npm.io/package/couchdb-api

## Dependencies (2)

- [request](https://npm.io/package/request.md) 2.11.x
- [underscore](https://npm.io/package/underscore.md) 1.3.x

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2013-01-12
- 1.2.1 — 2012-12-03
- 1.2.0 — 2012-09-22
- 1.1.5 — 2012-09-11
- 1.1.4 — 2012-04-13
- 1.1.3 — 2012-04-13
- 1.1.2 — 2012-04-11
- 1.1.1 — 2012-02-26
- 1.1.0 — 2012-02-26
- 1.0.0 — 2011-12-23
- 0.12.0 — 2011-12-12
- 0.1.0 — 2011-12-07
- 0.1.1 — 2011-12-07
- 0.2.0 — 2011-12-07
- 0.2.5 — 2011-12-07
- … 15 more at https://npm.io/package/couchdb-api/versions

## README

# node-couchdb-api

This [node.js](http://nodejs.org/) module aims to provide a clean, asynchronous wrapper for the [CouchDB](http://couchdb.apache.org/) API.

It uses callbacks that follow node.js conventions and aims to be as expressive as possible.

## Installation

`$ npm install couchdb-api`

## Usage

    var couchdb = require("couchdb-api");

    // connect to a couchdb server (defaults to http://localhost:5984)
    var server = couchdb.srv();

    // test it out!
    server.info(function (err, response) {
	console.log(response);

	// should get { couchdb: "Welcome", version: "1.0.1" }
	// if something went wrong, the `err` argument would provide the error that CouchDB provides
    });

    // select a database
    var db = server.db("my-database");

    db.info(function (err, response) {
	console.log(response);

	// should see the basic statistics for your test database
	// if you chose a non-existant db, you'd get { error: "not_found", reason: "no_db_file" } in place of `err`
    });

Refer to [my website](http://www.dbarnes.info/node-couchdb-api/) for documentation and resources.

## Changelog

**1.2.2**
 * Fixing issues #17, #12 and #11

**1.2.0**
 - Complete documentation rewrite (now generated automatically via source code comments with [dox](https://github.com/visionmedia/dox))
 - Simplified the JSHint config by putting it into a single file at the root
 - Simplified the `index.js` entry-point. `couchdb.srv()` now only takes a single argument, a string URL.


**1.1.5**
 - Changed the package.json to allow for installs on node engine version 8

---
_Source: https://npm.io/package/couchdb-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
