nodejs运行ts服务器

1.package.json

1)devDependencies 添加 “nodemon”: “^1.18.6” 2)scripts 添加  “start”: “nodemon –watch ‘**/*.ts‘ –exec ts-node src/index.ts” 3)npm install 4)npm run start