Couchbase Lite in NodeJS desktop app (using Electron)?


#1

Hi,

I am developing a desktop application using Electron, which means I am using NodeJS and JavaScript. The desktop application should run offline and I am looking for a database synchronization solution. Is it possible to use Couchbase Lite from NodeJS and synchronize it with remote Couchbase Server using the Sync Gateway?

Thanks a lot for any help.


Couchbase Mobile NodeJs
Couchbase Lite in a NodeJS Electron desktop app
#2

Yes, but you’ll need a small amount of native code to initialize Couchbase Lite. Our PhoneGap/Cordova plugin demonstrates how to do it:


#3

Thanks for the reply. What code exactly do you mean? Can pls point out the exact file?
Thank you


#4

Have you actually looked at the repo? There’s one native-code file there for each platform (iOS and Android.)


#5

Can we’ve a couchbase lite for nodejs that can be used in electronjs or in other nodejs based framework. I’m looking for couchbase lite for electronjs particularly, Really appreciate it.


#6

Talk to Couchbase’s sales engineers about a JavaScript API binding … the more potential customers there are for this platform, the more likely the mobile team will get the resources to implement it.


#7

Thank you for your response. Could you engage someone here from sales engineers? Desperately seeking for the lite for electronjs (As we’re almost done for an windows based app using electronjs that needs to be integrated with couchbase enterprise server). Any plan of it or how long it could take? Appreciate your response.


#8

If you’re already a customer, contact your SE; otherwise you can email sales@couchbase.com. (I think direct contact will have more impact than discussion on the forum.)


#9

You may find this recent blog post by @priya.rajagopal useful — it shows how to call Couchbase Lite 2 from React Native, which is similar to Electron in being a JS application layer. It’s not as easy as having a full JS API available, but it can get the job done.