Skip to content

Instantly share code, notes, and snippets.

@skinofstars
Last active December 21, 2016 22:08
Show Gist options
  • Save skinofstars/5485369 to your computer and use it in GitHub Desktop.
Save skinofstars/5485369 to your computer and use it in GitHub Desktop.
CouchDB notes

curl tricks

Create database

curl -i -H "Accept: application/json" -X PUT -d "" http://localhost:5984/chatbot/

Get all the data

curl -X GET http://localhost:5984/chatbot/_all_docs?include_docs=true

One time replication from remote

curl -H "Content-Type:application/json" -X POST -d '{"source":"http://skinofstars.iriscouch.com/chatbot/","target":"chatbot"}' http://localhost:5984/_replicator

Continuous push replication from local

curl -H "Content-Type:application/json" -X POST -d '{"source":"chatbot","target":"http://skinofstars.iriscouch.com/chatbot/", "continuous":true}' http://localhost:5984/_replicator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment