Problem with create document on Node.js


Hi, i want to create a documents by using Node.js script.
I used following code from this link

 myBucket.insert('document_name', {some:'value'}, function(err, res) {

Here i have query. why should i have to pass document name every time, is there any alternative to take unique id automatically.

i used coucbase lite, now i want access coucbase lite data on web browser by using Node.js script. On coubase lite, i had never gave any document name and id. all are generated automatically.


Hi, Couchbase Mobile gives you a full development model on top of Couchbase Server. The SDK access are more low level. We do not have mechanism to automatically add a document name.


Then i have a query. i was created a document from Couchbase Lite then its created automatically with some unique id. then now i want to update that document from Node.js

so what is the code for update the existing document by using Node.js script


You should use the Sync Gateway REST API described here: