Best practices in storing app state


#1

Greetings to everyone!

With no previous background of making desktop apps, I am concerned about how to store app state in files. As I found out you can get data path folder app.getDataPath() and manually write files there.

Also in the browserWindow there is a possibility to use localStorage that seems to work quite well for my purposes. Is there a way to work with localStorage outside browserWindow?

Other suggestions are welcomed.


#2

I’ve been using https://www.npmjs.org/package/diskdb for a while now and so far it works great


#3

Thanks. I will take a look.