To enable MongoDB module, do the following:
To work with mongodb, you need to install the composer extension, for this:
cd ~/example.com/www/
Instead example.com/www/
specify the path to the desired directory.
composer require mongodb/mongodb
27017
.