added app mode check in mongodb connection
Merge pull request #30 from aveekdeveloper/mongo

added app mode check in mongodb connection