Skip to content Skip to sidebar Skip to footer

Nedb Persistance In Electron App

I am trying to connect to nedb from electron app. CRUD operations work great. BUT I don't see db file (D:/my.db, checked for hidden files). File exists somewhere, because it keeps

Solution 1:

I found a way to work around this. When creating the datastore in the main.js and making it global, nedb won't use the indexedDB but a local file as specified.

Then in the renderer process get the datastore via Electron.Remote

Solution 2:

The doc says

If you specify a filename, the database will be persistent, and automatically select the best storage method available (IndexedDB, WebSQL or localStorage) depending on the browser.

Post a Comment for "Nedb Persistance In Electron App"