Closed norcal82 closed 8 years ago
adding .lib files to the db/design folders will import modules into couch.
.lib
db/design
here is an example of how this works.
module_name.lib.coffee
exports.str = 'hello world' exports.arr = [1,2,3,4,5] ....
couch views
(d) -> if d._id.indexOf("example/") is 0 emit d._id, { module_array: require('views/lib/module_name').arr }
Completes: #104
adding
.lib
files to thedb/design
folders will import modules into couch.here is an example of how this works.
module_name.lib.coffee
couch views