nodemon
is used to watch your file and re-run the npm script automatically. This is useful when you are doing server side programming in node.js.
npm i -D nodemon
"scripts": {
"server": "nodemon server/index.js",
"server:once": "node server/index.js"
},