The minimal version of get started with mongodb 🌱 local development


1 min read


Install MongoDB on local machine

In case your OS is MacOS.

brew tap mongodb/brew
brew install mongodb-community

# check configuration
cat /opt/homebrew/etc/mongod.conf

# check log file
cat /opt/homebrew/var/log/mongodb/mongo.log

# start the MongoDB service
brew services start mongodb-community

# To verify that MongoDB is running
brew services list

# Try MongoDB shell

Download compass tool - the GUI for MongoDB.

Or install compass by brew install --cask mongodb-compass command.

Connect MongoDB service on mongodb://localhost:27017 by that compass tool.

Clone data from remote MongoDB connection

mongodump --uri="mongodb://" [additional options]

mongodump is a utility for creating a binary export of the contents of a database.

mongorestore --uri="mongodb://localhost:27017/db_name" --db db_name dump/db_name

Open the compass tool again and view cloned data!