1npm install nodemon
2
3in your package.json add in the scripts
4"command":"nodemon mainfile.js"
5
6eg
7{
8 "name": "abc",
9 "version": "0.0.1",
10 "description": "my server",
11 "scripts": {
12 "start": "nodemon my_file.js"
13 },
14 "devDependencies": {
15 "nodemon": "~1.3.8",
16 },
17 "dependencies": {
18
19 }
20}
21