Electron and SQLite

Hi,

I have created a mobile app, web app and website with Wappler and have learnt a great deal so I thought I would try a desktop app with electron.

But I am confused about the SQLite option.

I created the basic project by selecting desktop app, including node.js and also a SQLite database but how do I access the database?

For background, the app will connect and pull data from an ecommerce site using the woocommerce API.

I am familiar with the woocommerce API (I previously tried creating a mobile app front end but got stuck with the cart etc.) and I do not want to store the woocommerce data offline but I thought I could use the SQLite database to store app settings and a few other bits of information.

I have the database connection -

But the workflows tab doesn’t show server connect, only app flows -

Previously I have used a server project for the database and API calls, then separate projects for the web or mobile front ends but I thought, given the options available when setting up the desktop project I should have everything for the desktop app in one project. If not, how would I combine/distribute the two projects?

I think I understand that node.js is needed to present the *.html pages and Wappler goodies on the pages but I thought it would also allow access to the local SQLite database (since there was an option to create the local database). Am I missing something? Is this integration on the roadmap? Should I be using a node or Cordova plugin?

Any tips/advice/ideas welcome :slight_smile:

1 Like

So, looking into this a bit more, the Wappler way for desktop apps is to create a server app for the data and API and then a desktop app for the front end, unless I use Docker where I can have both together.

Am I right in assuming I can’t combine them into one “app” that includes both but without Docker?

Essentially I want one desktop app that has a front end that can communicate with my SQLite database stored locally. No remote server.

Or is there a setup I am missing?

1 Like

Hi!
I’m a total novice and are wondering the same thing. Would be great if some of the amazing gurus in this forum could help out with this question :slight_smile:.

Still not sure if this is possible… Would love to do the same with some of our mobile applications. Maybe @George or @Teodor could clear this up for you, and hopefully let us in on if it is a feature that will be available in the near future, if not already available…?

Lucky enough to have a quite a few in the community! Sadly I’m not one of them hahaha.

:slight_smile:

2 Likes

Thanks for the swift reply @Dave! Would be great if this is possible! :slight_smile:

2 Likes

We are working indeed hard on our SQLite integration for mobile and desktop apps, so it will be coming up very soon.

See also:

5 Likes

Great news, thanks @George ! I’m looking forward to try it out!

That’s really good news :blush:, thanks for letting us know.

1 Like

Hi @George , any update on this integration? Tried again today but get the same results.

With the new Capacitor integration, we have to remake in SQLite integration in a whole new way. So hope to get it done soon, working on it now.

1 Like

Thanks for the update :+1:

@George any updates on SQLite integration?

Now you can use SQLite for your mobile and desktop projects: Using Local Databases in Mobile and Desktop apps

Fantastic news, well done guys I will go and have a play with it :smile:

1 Like

This topic was automatically closed after 24 hours. New replies are no longer allowed.