Will data in indexedDB be deleted when reinstall the Electron App via auto-updater?


We are considering using indexedDB as our data persistence backend.
But we are very worried about the data will be deleted when we add the auto update feature to our APP someday later.

Please help us.
Thanks very much.


As long as you store the database in app.getPath('appData') and not in the actual app directory, you’ll be fine. The actual app is installed in /Applications/YourApp, while all app data should be stored in /Library/Application Support/YourApp (which is what appData will return).


Great to hear that.
Thank you very much.