brew start mongodb community code example
Example 1: brew install mongodb
brew tap mongodb/brew
Example 2: install mongodb on mac
brew tap mongodb/brew
#step 1
Example 3: install mongodb on mac
brew install mongodb-community@4.2
#Step 2
Example 4: brew mongo start
brew services start mongodb-community@4.4