Full Stack Development - by Ryan Kirkman

Using Couchdb Cradle – Error free global configuration

14 Mar 2011

You may want to use the global configuration function in Cradle so you can open a connection like so:

var db = new(cradle.Connection)().database('starwars');

If your CouchDB server is not at http://127.0.0.1:5984, the object you pass to cradle.setup must contain the following properties:

Not doing so will result in frustrating errors. The cradle.setup function expects these values, meaning they will be set to null (default function argument value) if not provided.

comments powered by Disqus