使用nodemon提高nodejs调试效率

1、安装

nodemon

直接用npm安装既可,键入命令: npm -g install nodemon

。如果不行,检查电脑有没有联网,联网后输入

sudo npm -g install nodemon

2、nodemon的使用

用cd命令定位到项目的根目录

输入以下的命令

nodemon bin/www

请注意:这里无需npm start 命令

change directory:

$ cd blogs

install dependencies:

$ npm install

run the app:

$ DEBUG=blogs:* npm start

大功告成

1、安装

nodemon

直接用npm安装既可,键入命令: npm -g install nodemon

。如果不行,检查电脑有没有联网,联网后输入

sudo npm -g install nodemon

2、nodemon的使用

用cd命令定位到项目的根目录

输入以下的命令

nodemon bin/www

请注意:这里无需npm start 命令

change directory:

$ cd blogs

install dependencies:

$ npm install

run the app:

$ DEBUG=blogs:* npm start

大功告成