How to prepare data$ npm install cradle cradle@0.6.7 node_modules/cradle ├── vargs@0.1.0 ├── request@2.36.0 (tunnel-agent@0.4.0, json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, qs@0.6.6, oauth-sign@0.3.0, node-uuid@1.4.1, mime@1.2.11, tough-cookie@0.12.1, form-data@0.1.4, http-signature@0.10.0, hawk@1.0.0) └── follow@0.10.4 (debug@0.7.4, browser-request@0.3.1, request@2.30.0)
#How to prepare server side script
export http_proxy=""
#
export NODE_PATH=/home/uchida/node_modules
#
curl -X DELETE http://localhost:5984/librivox
curl -X PUT http://localhost:5984/librivox
#
./data_register.js combined.json
curl -X PUT http://localhost:5984/librivox/_design/myapp -d@ex02.json curl -X PUT http://localhost:5984/librivox/_design/myapp3 -d@ex03.jsonHow to check the function
curl http://localhost:5984/librivox/_design/myapp/_view/ex02?key=\"Japanese\" curl http://localhost:5984/librivox/_design/myapp/_view/ex02?key=\"Italian\" curl http://localhost:5984/librivox/_design/myapp/_view/ex02?key=\"Polish\"
curl http://localhost:5984/librivox/_design/myapp3/_view/ex03?key=\"Japanese\" curl http://localhost:5984/librivox/_design/myapp3/_view/ex03?key=\"Italian\" curl http://localhost:5984/librivox/_design/myapp3/_view/ex03?key=\"Polish\"