Skip to content

Instantly share code, notes, and snippets.

@stories2
Last active August 7, 2019 07:20
Show Gist options
  • Save stories2/3135104144aa0e362ffb972e92a64357 to your computer and use it in GitHub Desktop.
Save stories2/3135104144aa0e362ffb972e92a64357 to your computer and use it in GitHub Desktop.
CouchDB as api server setup

This is how to enable enter from remote client app.

  1. Open the couch db web dashboard which is localhost:5984/_utils/index.html maybe
  2. Enter the setting page
  3. Fix severial part
Section Option Value
chttpd bind_address 0.0.0.0
  1. Accept Incoming port 5984, TCP

This is how to enable cors request from client app.

  1. Open the couch db web dashboard which is localhost:5984/_utils/index.html maybe
  2. Enter the setting page
  3. Fix severial part
Section Option Value
cors credentials true
headers x-requested-with, accept, authorization, content-type, origin, referer, if-match
methods GET, PUT, POST, HEAD, DELETE, OPTIONS
origins [WHAT YOU WANT ENABLE ORIGIN]
httpd enable_cors true
  1. Run cmd as Admin
  2. Restart CouchDB process
net.exe stop "Apache CouchDB" && net.exe start "Apache CouchDB"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment