How to create local MongoDB database code example
Example 1: mongodb start server
sudo systemctl start mongodb
Example 2: how to export mongodb database to json
sudo mongoexport --db newdb -c restaurants --out newdbexport.json
sudo systemctl start mongodb
sudo mongoexport --db newdb -c restaurants --out newdbexport.json