MAAAAANI
MAAAAANI

Reputation: 196

Using cradle how to create new database in couch db

In my application im using node.js to connect with couchdb.Im new to couch db so i dont know how to connect with couch db using cradle.Please help me on this.I tried the below code but new 'test' database is not created.

            var cradle=require('cradle');

            cradle.setup({
            host: 'https://mydomain.iriscouch.com',
            cache: true,
            raw: false
              });

            var c = new(cradle.Connection);

            var db = c.database('test');
            db.create();

Upvotes: 1

Views: 461

Answers (1)

Amith Koujalgi
Amith Koujalgi

Reputation: 10942

Try this to create a connection:

var c = new cradle.Connection();

Upvotes: 1

Related Questions