couch-db

Couch-db is a simple node.js client of couchdb

npm install couch-db
35 downloads in the last day
109 downloads in the last week
156 downloads in the last month

Couch-db

Couch-db is a simple node.js client of couchdb

Installation

npm install couch-db --save

Usage

var couchdb = require('couch-db');

var db = couchdb({
    port: 80,
    host: 'registry.npm.lc',
    auth: {
        username: 'Kael'
        password: 'blahblah'
    }
});

Methods

Arguments

path String

Couchdb path

options Object

request options

callback function(err, res, json)

Callback

err mixed
res http.ServerResponse
json Object

Server data

db.hasAuth()

returns Boolean whether the current instance has the authentication information.

db.get(path, options, callback)

db.put(path, options, callback)

db.del(path, options, callback)

db.attachment(path, options, callback)

Programmatical Details

couchdb(options)

options.makeCallback

type function(callback)

Specifies your custom wrapper of each original callback.

npm loves you