Installation on macOS
Homebrew is the recommended path. Homebrew puts mongod on the PATH;
mongod --version confirms the server installation, as on the other
platforms. After brew services start mongodb-community, the server listens
on localhost:27017. Connect with mongosh.
To find the real Homebrew prefix on your machine:
brew --prefixThe configuration and data paths above derive from it
($(brew --prefix)/etc/mongod.conf, $(brew --prefix)/var/mongodb).