Installing and setting up CouchDB and Cradle
CouchDB comes as a click-and-run installer for major platforms.
How to do it…
To begin, you first need to install the server. To do this, go to http://couchdb.apache.org/ and download the installer appropriate for your platform. Before installing Cradle, be sure to run the installer.
Next, on a command line, run the following command to install Cradle:
npm install cradle
Finally, you need to enable cross-resource requests on the CouchDB server, to permit those requests on the Web. To do this, edit the /etc/couchdb/default.ini
file, and change the following line:
enable_cors = false
With the following line:
enable_cors = true
You also need to indicate which origin servers you'll accept CORS requests from; to enable cross-resource requests for all domains, add the following line to /etc/couchdb/default.ini
in the section labeled [cors]
:
origins = *
If you want to be more specific, you can provide a comma-separated list of origin domains from...