Can MongoDB be packaged in an Electron app?

You can actually use indexeddb which is a JavaScript-based object-oriented database.


The simple and obvious answer is: No. MongoDB is AFAIK not embeddable, at least not in any sense of the word straightforward.

But the real question is, what problem do you want to solve? Perhaps is PouchDB the database, you want to ship with your app.


Yes. I have used this method in the past. It brings in mongod.exe and launches it.

Take a look here to see how it is done.

https://github.com/nosqlclient/nosqlclient-electron/blob/master/index.js