Local, file-based database for an Electron application
<p>We are working on an application that will be offered both as a web-based  and as a cross-platform desktop solution by means of <a href="http://electron.atom.io/" rel="noreferrer">Electron</a>.</p>

<p>Due to customer requirements, the desktop client cannot make use of "the cloud" to store data; all data should be stored in the local machine or, even better, the user should have the option to keep the database/data file on an external HDD so that another user on the same local network can use the same data file.</p>

<p>We've been looking at <a href="https://github.com/louischatriot/nedb" rel="noreferrer">NeDB</a>, <a href="https://pouchdb.com/" rel="noreferrer">PouchDB</a>, etc, but all these use either Web SQL or IndexedDB on the browser itself to store the data.
NeDB can theoretically use the file system but that seems only possible for Node Webkit apps.</p>

<p>Another option is of course <a href="https://www.mongodb.com/" rel="noreferrer">MongoDB</a>, but it requires setting up a site on a web server. Seeing as how our users will set that up in on their own machines, that will work for one user only but would make it very hard for them to share the data (<em>note: assume users with little technical know-how</em>).</p>

<ul>
<li>Is there a way to force NeDB to persist data in a file instead of the in-browser database?</li>
<li>Alternatively, does any one know of a file-based, compact database that plays well with electron/node?</li>
</ul>

<p>We'd preferably like to use a NoSQL database, but options of file-based SQL databases will be considered as well.</p>