module to restart server: Nodemon
npm install --save nodemon
package.json
---
"scripts": {
....
"dev": "nodemon index.js"
}
>npm run dev
So, whenever there is a change in code, automatically the server gets restarted by nodemon.
No comments:
Post a Comment