I am trying to connect MongoDB database manually. So how is it possible to get the collection in MongoDB. I need to implement the code in custom js file and not in bootscript. If I include server.js file the problem is the entire application including the web server, boot scripts, etc, runs for the duration of the script, which means I'd have two instances of the app running.
So is there any way to manually integrate MongoDB and fetch documents in a collection.
Any help would be really appreciated.
Thanks in Advance