yet another collection of couchdb node utilities
JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

README - n-couch

ncouch is yet another collection of couchdb node utilities.

It can be used as a command line tools (as in couchapp) or as a commonjs modules.

Getting Started


Create a new project and run a testing couchdb instance

$ ncouch generate project hellocouch
ncouch v0.1.0beta
Creating 'hellocouch' ncouch project dir...
Creating 'design' dir...
Creating 'example' design doc...
Creating 'example' design doc resource directories (attachments and libs)...

couchdb -a couchdb-user-test.ini

In another shell:

$ cd hellocouch

hellocouch$ ncouch push http://admin:admin@localhost:5984/hellocouch
ncouch v0.1.0beta
pushing... example.js
    CREATING DESIGN DOC '_design/example'.

An ncouch design doc is a node commonjs module which exports design_doc, attachments and libs attributes:

// design/test1.js
exports.attachments = {
  res_dir: ""test1/attachments", 
  exclude_rx_list: [/.*~/]

exports.libs = {
  res_dir: "test1/libs", 
  exclude_rx_list: [/.*~/]

exports.design_doc = {
  validate_doc_update: function(newDoc, oldDoc, userCtx) {
  views: {

CommonJS Module