Can MongoDB be packaged in an Electron app?

2019-02-14 03:36发布

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?

2条回答
疯言疯语
2楼-- · 2019-02-14 04:13

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

查看更多
Juvenile、少年°
3楼-- · 2019-02-14 04:14

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.

查看更多
登录 后发表回答