npm install
and then grunt
to start a local server.
[httpd]
enable_cors = true
[cors]
credentials = true
origins = http://localhost:3000
[couch_httpd_auth]
require_valid_user = false
You need a view in your database with validate_doc_update
key.
{
"_id": "_design/anything",
"validate_doc_update":
"function(newDoc, oldDoc, userCtx, secObj) {
if(!userCtx.name) {
throw({forbidden: 'Please login.'})
}
}"
}