I am running an electron app, where in its renderer process I use HTML5 localStorage.
I'm interested to know where in my file-system is this localStorage actually stored (I believe it is in SQLite format).
I saw the answer for where is a browser localStorage stored, here:
Where the sessionStorage and localStorage stored?
I'm asking this because I would like to be able to run 2 instances of this electron application, so that each application will have different settings in which I save in localStorage.
Specifically I'm most interested in windows 10, but an answer wrapping all OS will be great.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
It's stored in the AppData folder, which you can find by looking at the value of require('app').getPath('userData')
.
This means the data persists even if the app is deleted. If you're running two instances, you'll need to find some way of distinguishing between them so they don't trample on each other's data.