[misc] mongodb: refactor the process of setting up the db construct
[misc] mongodb: refactor the process of setting up the db construct

Co-Authored-By: John Lees-Miller <7c997d87bc888f6beeb38077bba8eced3d0eb11c@gmail.com>

sharelatex/sharelatex