Can I use NodeJS templates/partials in Desktop/Electron apps?

I want to create a Desktop app using NodeJS, SQLite, and templates/partials. Is this possible? If so, how do I setup Wappler for it?

It seems Wappler does not get setup properly to use templates/partials if you select Desktop during the initial Project creation. It only allows it if you select Web.

Have a read of this article:

Then ask yourself, why electron?

Create a normal NodeJS/EJS site and add the Service Worker and Manifest to complete the PWA.

This will give you a few tips:

Hi @ben, that’s an interesting option, but not one I have explored. I have a need to use a local database and workflow that will only run on the User’s local machine. Would PWAs be able to achieve this functionality?

I do not see a reason why this would not work. I have no experience (yet) with what you are proposing.

A direct link to the database should be possible, but if that is not the case, then IndexDB should do the trick which, after a session, can be offloaded to the SQLight database.

In fact, on theorizing further, the IndexDB method may make the application a lot faster.

I think this is possible. It was discussed here, where George mentioned:

I haven’t had time to experiment with this, but it sounds promising.

1 Like

Yes, it’s been discussed, but I don’t see an easy path to implement. There is also a mention by @George about needing to connect all of it into the Electron build.

All that said, it would be nice to be able to select “Desktop” when creating a project and have more of the functionality provided in the “Web” project type – like “Server Model” so you can use the NodeJS templating while building the Desktop app.