O'Reilly logo

JavaScript JSON Cookbook by Ray Rischpater

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required