node.js - Store data in couchbase using NodeJs and cradle -


i trying save data point in couchbase using cradle nodejs. checkout code :

var cradle = require('cradle'),db; var connection = new(cradle.connection)('localhost', 8091, {     auth: { username: 'admin', password: 'admin' } });  var db = connection.database('data'); db.save('exercise', {    name: 'satyam',    age: '24' }, function (err, res) {     if (err) {         // handle error         console.log("save error: not save record!!");     } else {         // handle success         console.log("sucessful save: record saved in couchdb!");     }     console.log(res, new date()); }); 

while executing code getting msg : sucessful save: record saved in couchdb! {} mon mar 10 2014 17:57:09 gmt+0530 (ist)

which seems res not having data. can me out problem.

you using wrong client. cradle couchdb client, whereas couchbase different database. have common root, getting looks it's working, overall using wrong tool.

try using instead: https://github.com/couchbase/couchnode


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -