xxxxxxxxxx
// nodemon.json
{
"watch": ["src"],
"ext": "ts",
"exec": "ts-node ./src/app.ts"
}
// package.json
{
"start" :"rm -rf dist/ && tsc --project . && node dist/app.js",
"dev": "nodemon ."
}
xxxxxxxxxx
// install package globally
npm i -g nodemon ts-node
// Run this for compile and run:
npx nodemon index.ts
// you can add this in package.json in script section, and run command npm run ts dev
"ts dev": "npx nodemon index.ts"