brew services start mongodbb code example
Example 1: install mongodb on mac
brew tap mongodb/brew
#step 1
Example 2: run MongoDB manually as a background process macos
mongod --config /usr/local/etc/mongod.conf --fork
brew tap mongodb/brew
#step 1
mongod --config /usr/local/etc/mongod.conf --fork