Is Node API commands equal with CBLite PhoneGap Plugin API commands

Hi,

Can I use all of Node API in CBLite PhoneGap plugin?

For example can I user the following Node codes with Couchbase Lite PhoneGap plugin?

   var couchbase = require('couchbase');
    var db = new couchbase.Connection({bucket: "default"}, function(err) {
      if (err) throw err;

      db.set('testdoc', {name:'Frank'}, function(err, result) {
        if (err) throw err;

        db.get('testdoc', function(err, result) {
          if (err) throw err;

          console.log(result.value);
          // {name: Frank}
        });
      });
    });

Hey @efkan,

Unfortunately, Couchbase Server Node API is not able to be used in the CBLite PhoneGap plugin.

So, I can use just Couchbase Lite REST API while develop an PhoneGap application.

Thank you Will, have a nice day…

Hey @efkan,

That’s correct, the Couchbase Lite REST APIs are different than the Couchbase Server Node APIs as it uses libcouchbase and would not work together.