Oct 19, 2011 / 28 notes

build a json file and POST to couchdb

tip by Jan Lenardt @ couchdb mailing list

echo '{"docs":[' >> file.json
cat productSimple.json >> file.json
echo ']}' >> file.json
curl -d @file.json -X POST http://localhost:5984/bbyopen/_bulk_docs -H
                                                               "Content-Type:    application/json"
  1. jsrcprot reblogged this from wactbprot
  2. wactbprot posted this