Skip to content

Instantly share code, notes, and snippets.

@framallo
Created December 21, 2010 16:31
Show Gist options
  • Save framallo/750162 to your computer and use it in GitHub Desktop.
Save framallo/750162 to your computer and use it in GitHub Desktop.
allDocuments = function(db) {
console.log("Show All Docs"+ db.getLength());
db.view({
map : function(doc, emit){ console.log(doc) },
finished : function(view){ }
});
}
db2 = BrowserCouch('pages');
db2.sync('http://admin:admin@localhost:5984/pages',
{'continuous' :true,
'interval' :500,
'update' : function(){
console.log('update');
console.log(db2.getLength());
}
});
allDocuments(db2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment