Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!