Switch mongo configuration to be done via a JSON object that gets passed through