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 ...

Get JavaScript JSON Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.