Programming CouchDB with Javascript