Setting nodemon at project level - without global install
If you do not want to install nodemon as global dependency for whatever the resons, you can follow the below steps to setup as dev dependency
1. Install nodemon as dev dependency
Run the following command to install nodemon as dev dependency
npm install --save-dev nodemon
2. Add dev command to use it
Add the following script command to use npm when run as dev in package.json
"scripts": {
"dev": "nodemon index.js",
"start": "node index.js",
...
},
3. Use dev command to start using nodemon
Now you can fire the following command to start using nodemon
npm run dev