couchdbreq
Very simple client to couchdb.
Install
Usage
Insert
var cdb = require('couchdbreq')();
cdb.insert("item", {foo:"bar"}, function(err, statusCode, response){
console.log(response);
});
Getting data
cdb.get("item", function(error, statusCode, response) {
if (statusCode === 404){
return;
}
console.log(response);
});
Get all documents
cdb.get("item/_all_docs", function(error, statusCode, response) {
if (statusCode === 404){
return;
}
console.log(response);
});
Delete
cdb.del("item", function(error, statusCode, response) {
if (error){
console.log(error);
return;
}
});
License
MIT