This document was migrated from DigiDocs
Problem: Manually reloading the NodeJS server by hitting
Ctrl + C and entering
npm start repeatedly in development is exhausting.
Solution: Automatically reload the server each time there is a change!
Nodemon is a utility that will monitor for any changes in your source and automatically restart your server.
npm i -g nodemon.
nodemonin your command. For example, change
nodemon index.js. That's it.
You can also add it to npm scripts to make life even easier.
After doing so, you can enter
npm run dev subsequently, which will resolve to