How to store DB as a file instead of IndexedDB


#1

Hello there! I’m new in this community and I hope you can help me with this issue.

Right now I’m using electron, angular2 and NeDB as my Database. The thing is that when I create the DB, it gets “autoloaded” into IndexedDB, client-side or something like that no? (even if I select the path location of it).

On other projects without electron, I just create the DB and it creates the file right in the project folder.

Don’t really know how to store my DataBase as a file instead of IndexedDB. That’s mainly because I cannot share the app folder between 2 or more pcs because the data don’t stay on its actual folder but stays as IndexedDB (which as far as I know is “part” from the pc and cannot move it from there).

You guys know why it’s getting loaded as IndexedDB instead of a local file? Maybe NeDB is not the best db to use with electron? What do you suggest me instead?

Hope you guys can give me a hand with this since I’m a bit new to this kind of technology.


#2

Make sure your NeDB code and operations remain in the main process of Electron and not in the renderer.