how to check if mongoose (MongoDb) is installed or not

To check if mongoose module is installed simply find the version by

npm list mongoose

To check globally

npm list -g  mongoose

Mongoose is a npm module. Mongodb may or may not be installed.

To check whether mongodb is installed:

which mongo

To install mongodb locally:

brew install mongodb

Then follow the post-installation instructions.

ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

Test your connection to mongodb.

mongosh