louischatriot / nedb

The JavaScript Database, for Node.js, nw.js, electron and the browser
MIT License
13.5k stars 1.03k forks source link

Returning data entries to browser window to render #523

Open awingit opened 7 years ago

awingit commented 7 years ago

So I am struggling to simple display entries from the database in a browser window. Just a basic setup really. When using NeDB in the main process of electron, then all is fine. I can access an existing .db file and manipulate the data.

However, I cannot figure out how to display those entries in the index.html. I just cannot seem to pass the information between the windows.

So I tried the browser version but cannot seem to access the existing .db file that way.

Is there a basic example to demonstrate how one can keep NeDB in the main process and being able to simply loop through the data and render it in the window?

JamesMGreene commented 7 years ago

This is an shortcoming with your understanding of the IPC flow that Electron provides, nothing to do with NeDB.

You should review the following Electron docs: