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
请告知我如何检查它是否安装正确。我用苹果电脑
4 个解决方案
#1
17
To check if mongoose
module is installed simply find the version by
要检查mongoose模块是否安装,只需找到该版本。
npm list mongoose
To check globally
在全球范围内检查
npm list -g mongoose
#2
7
Mongoose is a npm module. Mongodb may or may not be installed.
Mongoose是一个npm模块。Mongodb可以安装,也可以不安装。
To check whether mongodb is installed:
检查mongodb是否安装:
which mongo
To install mongodb locally:
在本地安装mongodb:
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.
测试您与mongodb的连接。
mongo
#3
0
If you are using MongoLab, to connect to database type: mongo
If you are running Mongo locally, start the Mongo daemon:
In the terminal type: mongod
If that doesnt run try: sudo mongod
Once mongoDB is running open another terminal window and type: mongo
In the same window type: show dbs
To work with a database in the list named myDB, for example type : use myDB
如果您使用的是MongoLab,连接数据库类型:mongo如果您正在运行本地mongo,启动mongo守护进程:在终端类型:mongod如果不运行:sudo mongod一旦运行mongoDB打开另一个终端窗口并键入:mongo在同一个窗口类型:show dbs使用一个名为myDB的数据库列表中,例如类型:使用myDB
#4
0
Two ways to check whether mongoose is install in your ubuntu/debian.
有两种方法可以检查mongoose是否安装在ubuntu/debian中。
a) check locally( means into your project directory within node_modules)
a)本地检查(意味着进入node_modules中的项目目录)
For local - npm list mongoose
本地- npm列表
b) check globally( means in your OS within node_modules ).
b)全局检查(指在node_modules中的操作系统中)。
For global check- npm list -g mongoose
用于全局检查- npm列表-g mongoose
It will show you the version of mongoose, if it already installed. If not then this will show this-
如果已经安装,它将向您显示mongoose的版本。如果不是,这将显示这个-
/home//.nvm/versions/node/v6.11.0/lib └── (empty) npm ERR! code 1
/home/ .nvm /版本/节点/ v6.11.0 / lib└──(空的)npm犯错!代码1
To install mongoose in ubuntu/debian, run this command in terminal - npm install --save mongoose
要在ubuntu/debian中安装mongoose,请在终端——npm安装——保存mongoose中运行这个命令
#1
17
To check if mongoose
module is installed simply find the version by
要检查mongoose模块是否安装,只需找到该版本。
npm list mongoose
To check globally
在全球范围内检查
npm list -g mongoose
#2
7
Mongoose is a npm module. Mongodb may or may not be installed.
Mongoose是一个npm模块。Mongodb可以安装,也可以不安装。
To check whether mongodb is installed:
检查mongodb是否安装:
which mongo
To install mongodb locally:
在本地安装mongodb:
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.
测试您与mongodb的连接。
mongo
#3
0
If you are using MongoLab, to connect to database type: mongo
If you are running Mongo locally, start the Mongo daemon:
In the terminal type: mongod
If that doesnt run try: sudo mongod
Once mongoDB is running open another terminal window and type: mongo
In the same window type: show dbs
To work with a database in the list named myDB, for example type : use myDB
如果您使用的是MongoLab,连接数据库类型:mongo如果您正在运行本地mongo,启动mongo守护进程:在终端类型:mongod如果不运行:sudo mongod一旦运行mongoDB打开另一个终端窗口并键入:mongo在同一个窗口类型:show dbs使用一个名为myDB的数据库列表中,例如类型:使用myDB
#4
0
Two ways to check whether mongoose is install in your ubuntu/debian.
有两种方法可以检查mongoose是否安装在ubuntu/debian中。
a) check locally( means into your project directory within node_modules)
a)本地检查(意味着进入node_modules中的项目目录)
For local - npm list mongoose
本地- npm列表
b) check globally( means in your OS within node_modules ).
b)全局检查(指在node_modules中的操作系统中)。
For global check- npm list -g mongoose
用于全局检查- npm列表-g mongoose
It will show you the version of mongoose, if it already installed. If not then this will show this-
如果已经安装,它将向您显示mongoose的版本。如果不是,这将显示这个-
/home//.nvm/versions/node/v6.11.0/lib └── (empty) npm ERR! code 1
/home/ .nvm /版本/节点/ v6.11.0 / lib└──(空的)npm犯错!代码1
To install mongoose in ubuntu/debian, run this command in terminal - npm install --save mongoose
要在ubuntu/debian中安装mongoose,请在终端——npm安装——保存mongoose中运行这个命令