Mongo DB config and API controller