Write couchdb security object from file or directory.
secure(url, source[, options], callback)url- CouchDB database URLsource- Can be a Couchapp Directory Tree, JSON file or CommonJS/Node module. Please see couchdb-compile for in depth information about source handling.callback- called when done with aresponseobject describing the status of all operations.
var secure = require('couchdb-secure')
secure('http://localhost:5984/mydb', 'couchdb/security.json', function(error, response) {
// here we go
})couchdb-secure URL [SOURCE]When SOURCE is omitted, the current directory will be used.
couchdb-secure http://localhost:5984/mydb couchdb/security.jsonnpm test