Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I installed mongoose using

sudo npm install -g mongoose

Please advice on how I can check to see if its installed properly. I am using Mac

like image 919
Amit Avatar asked Jun 18 '14 05:06

Amit


People also ask

How do you check if Mongoose is installed or not?

If you want to confirm that you have installed mongoose you can check in the node_modules folder. This is the folder where npm installs everything. There is typically a folder for every package installed. You will find a mongoose directory if you have installed mongoose correctly.

How do you find MongoDB is installed or not?

You can find it in the installation directory where you installed MongoDB. By default, it is "C:\Program Files\MongoDB\Server". Open the installation folder and appropriate version folder and go to the "bin" folder. Here, "mongo.exe" is MongoDB shell.

How do I know if MongoDB is installed on Linux?

MongoDB installs as a systemd service, which means that you can manage it using standard systemd commands alongside all other sytem services in Ubuntu. To verify the status of the service, type: sudo systemctl status mongodb.

Does Mongoose install MongoDB?

However, given Mongoose wraps the mongodb native driver and that does not require MongoDB installation, I would expect that you do not need to have it installed when not using localhost.


2 Answers

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

npm list mongoose

To check globally

npm list -g  mongoose
like image 158
JRodDynamite Avatar answered Oct 21 '22 13:10

JRodDynamite


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
like image 42
s2t2 Avatar answered Oct 21 '22 12:10

s2t2