I have an issue with connecting to Cauchbase which is running locally on my Ubuntu machine. I tried to connect the cauchbase through following piece of code.
const { connect, Ottoman } = require(‘ottoman’);
const ottoman = new Ottoman({ collectionName: ‘_default’ });
try {
new Promise((res, rej) => {
ottoman.connect({bucketName:‘test’, username:‘Theekshana’,password:‘testtest’});
}).then((result) => {
console.log(result);
}).catch((err) => {
console.log(err);
});
} catch (error) {
console.log(error);
}
The versions of dependencies i am using are follows;
“ottoman”: “^2.0.0-alpha.14”,
“couchbase”: “^3.1.1”,
cauchbase server -community Edition 6.6.0 build
The error i am getting is ;
UnhandledPromiseRejectionWarning: Error: cluster object was closed
Can anyone help. Thanks in advance