index.js
function push (directory, uri, callback) {
  var db = nano(uri);
  loadDocument(directory, function (err, doc) {
    if (err) return callback.call(null, err);
    loadAttachments(doc, directory, function (err, doc) {
      if (err) return callback.call(null, err);
      db.get(doc._id, function (err, body) {
        if (err && err.reason !== "missing") return callback.call(null, err);
        if (body && body._rev) {
          doc._rev = body._rev;
        }
        db.insert(doc, doc._id, callback);
      });
    });
  });
}
function push (directory, uri, callback) {
  var db = nano(uri);
  loadDocument(directory, function (err, doc) {
    if (err) return callback.call(null, err);
    loadAttachments(doc, directory, function (err, doc) {
      if (err) return callback.call(null, err);
      db.get(doc._id, function (err, body) {
        if (err && err.reason !== "missing") return callback.call(null, err);
        if (body && body._rev) {
          doc._rev = body._rev;
        }
        db.insert(doc, doc._id, callback);
      });
    });
  });
}
function push ( directory , uri , callback ) { var db = nano ( uri ) ; loadDocument ( directory , function ( err , doc ) { if ( err ) return callback . call ( null , err ) ; loadAttachments ( doc , directory , function ( err , doc ) { if ( err ) return callback . call ( null , err ) ; db . get ( doc . _id , function ( err , body ) { if ( err && err . reason !== "missing" ) return callback . call ( null , err ) ; if ( body && body . _rev ) { doc . _rev = body . _rev ; } db . insert ( doc , doc . _id , callback ) ; } ) ; } ) ; } ) ; }
Build a design document from the specified directory
and push it to a Couch at the specified uri.

@param {string} directory
@param {string} uri
@param {function} callback (err, responseBody)
Build a design document from the specified directory and push it to a Couch at the specified uri .