Can MongoDB be packaged in an Electron app?

半腔热情 提交于 2019-12-30 04:59:05

问题


Can I package MongoDB in an Electron app so I don't need to install it on a client's machine? I'm developing an app on OSX and it will probably be used on Windows. Do I need to separately install Mongo on the clients?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/46926506/can-mongodb-be-packaged-in-an-electron-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!