I am not sure if it is possible or not. I am building a desktop application which will use MongoDatabse. I am packing my application in .deb and in .exe but I also want to pack MongoDB with it. So one does not need to manually download the mongo database to use my app.
99.9% times the system on which my application will be installed will be a normal system with no database. Something like desktop ERP.
How can I solve this or If it's not possible, is it possible to auto-download and install Mongo DB by some script on all platforms.
It's perfectly possible to ship MongoDB with your application. In the official MongoDB website you can select the Package type to download, which can be zip for Windows or tgz for Debian. After unpacking them, you can start the Mongo daemon using the command line mongod and add the --port and --dbpath parameters. E.g.: mongod --port 27080 --dbpath C:\MyApp\db.
I understand where you come from, as most DBs require an installation/configuration before using them. Although MongoDB has installers, it's possible to setup a working instance by just extracting the compressed files from the downloads page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With