mongodb already installed on mac but not code example
Example 1: brew install mongodb
brew tap mongodb/brew
Example 2: install mongodb on mac
brew services start mongodb-community@4.2
#Step 3 to run as a service
brew tap mongodb/brew
brew services start mongodb-community@4.2
#Step 3 to run as a service