starting mongodb instance mac code example
Example 1: install mongodb in mac
// updated 2021
$ brew tap mongodb/brew
$ brew install mongodb-community@4.4
Example 2: start mongodb server mac
mongod --config /usr/local/etc/mongod.conf --fork
// updated 2021
$ brew tap mongodb/brew
$ brew install mongodb-community@4.4
mongod --config /usr/local/etc/mongod.conf --fork