In some situation, you may not be able to use mongodb driver to connect mongo db database, for example, google apps script cannot connect mongodb directly. You can use restHeart as a middle man, but alternatively, you can use Mlab’s RESTful API directly if you are using MLab’s mongodb.
By default, the RESTful API of Mlab mongodb is disabled. You have to login to your user panel to activate it.