1、安装nodemon
//全局安装
npm install -g nodemon
//本地安装
npm install nodemon --save
2、修改package.json配置
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "tsc && node app.js",
"dev": "nodemon" // npm run dev
}
3、命令行中输入npm run dev