Created
May 31, 2011 11:09
-
-
Save janmonschke/1000316 to your computer and use it in GitHub Desktop.
Backbone couch connector blogpost v0.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ddoc/byCollection/map.js | |
function(doc) { | |
if(doc.collection){ | |
emit(doc.collection, doc); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paste this into your app file and fill in your couchdb setup | |
Backbone.couchConnector.databaseName = "backbone-couchapp"; | |
Backbone.couchConnector.ddocName = "backbone-couchapp"; | |
Backbone.couchConnector.viewName = "byCollection"; | |
Backbone.couchConnector.enableChanges = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment