mongod start terminal code example
Example 1: check if mongodb is running mac
ps -ef | grep mongod | grep -v grep | wc -l | tr -d ' '
Example 2: start mongodb server mac
mongod --config /usr/local/etc/mongod.conf --fork
ps -ef | grep mongod | grep -v grep | wc -l | tr -d ' '
mongod --config /usr/local/etc/mongod.conf --fork