• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help!! Error in saving JSON documents on couchdb from javascript using kanso

 
Akshata Mahajan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How can a JSON document be saved on couchdb using "db" package in kanso through your javascript code? This is what I've tried but it doesn't work:

var db=require('db').use('it');
db.saveDoc(doc, function(err,response)
{
if(err)
{
alert('Error');
}
else
{
alert('Data Added successfully');
}

});
Any kind of help will be appreciated. Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic