node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »


Coux, pronounced "Couch"

Coux is the least amount of CouchDB client I can imagine. It doesn't do much, but it is relaxing.


The only thing worth noting is that for coux, arrays are a perfectly good way to specify paths. And it'll do the URL encoding for you.

var db = "";
// Get database info: 
coux(db, function(err, info) {
// Get a document: 
coux([db, "mydocid"], function(err, doc) {
  // Update a document: 
  doc.updated_by = "yours truly";
  coux.put([db, "mydocid"], doc, function(err, ok) {
// Create a document letting the server assign the id: 
var newDoc = {foo : "bar"};, , function(err, ok) {
  // Delete a document without sending the doc body 
  coux.del([db,, {rev : ok.rev}], function(err, ok) {