I am building a component that is consumable by NPM. The application needs to connect to the database. If the user does not specify the details to the database uri in the config files, my application should spin up an instance of mongoDB from within the application itself.
I have seen many tutorials on how to integrate mongoDB into node.js, express, mocha and many other libraries, but all connect to an external database that's already running.
mongoDB server is being included as part of the dependencies so is installed with everything else, but I'm coming up short on material online on how to do boot up the database when the application starts.
Any help would be greatly appreciated. I suspect the information is out there, but I'm having a hard time finding it :(