markdown npm命令

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown npm命令相关的知识,希望对你有一定的参考价值。

# Npm Express libs:
###	1. Express (Framework)
###	2. Bodyparser (middleware)
###	3. cors ( for giving access from any client)
###	4. morgan (for logging on console about calls)
###	5.jsonwebtoken ( for creating auth  Bearer token)
###	6.bcryptjs ( for password hashing)[npm i bcrypt-nodejs --save]


# Npm Mysql lib:
###	1. mysql2

## Delete all nodemodlues and install again following dependencies
```
rm -rf node_modules && npm install
```


# Npm Commands:

###	For Initializing a Package:
```
npm init
```	
###	For install a lib into a local project:
```
npm install libName(just install no dependecies in package.json)
						
						npm install --save libName(install and add dependencies in package.json)
```

###	For install a lib as dev dependencies   
```
npm install --save-dev libName(dev dependencies will be used only in developing preiod, not in publish product)
```

### 	For Global dependencies which is not only for a project for the whole npm system.
```
npm install -g libName 
```

### Note: can use shorter format like:  
```
npm i projectName 
```

##	For Start a npm server(express): 
```
npm start
```

##	For Close server OR stop npm command:
```
cntl+c
```

### Uninstall a package:
```
npm un <packageName>
```
###  List installed packages:
```
npm list —depth=0
```
###  View outdated packages:
```
npm outdated
```
### Update packages:
```
npm update 
```
## - To install/uninstall packages globally, use -g flag. 
 

For es6 thread :

	/*jshint esversion: 6 */


以上是关于markdown npm命令的主要内容,如果未能解决你的问题,请参考以下文章

markdown npm命令

markdown npm命令

markdown NPM命令

markdown 有用的npm命令和技巧

markdown NPM脚本命令在课程的各个阶段

markdown Powershell无法识别与NPM全局包相关的命令