using nodemon with ts code example
Example 1: using nodemon with typescript
nodemon --watch "src/**" --ext "ts,json" --ignore "src/**/*.spec.ts" --exec "ts-node src/index.ts"
Example 2: nodemon with ts-node not work on linux
"scripts": {
"cleanup": "rimraf dist",
"build": "tsc --pretty",
"start": "node dist/server.js",
"dev": "nodemon -w 'src/**/*.ts' -x ts-node --files -H -T server.ts",
"format": "prettier ./src/**/*.{ts,spect.ts,test.ts} --write",
"lint": "eslint ./src/**/*.{ts,spect.ts,test.ts} --fix",
"lintfix": "npm run format && npm run lint",
"test": "jest",
"test:watch": "jest --watchAll"
},