1、在项目中安装nodemon 模块
npm install nodemon --save -dev
2、在package.json中添加以下画红框的脚本
{
"name": "server",
"version": "0.0.0",
"scripts": {
"postinstall": "tsc -p .",
"watch": "tsc -w -p .",
"debug": "nodemon --watch ./build --inspect=0.0.0.0:5858 --nolazy ./build/index.js",
"docker-debug": "dock