See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/restart-...
This tutorial will explain how to restart a Node.js application after changing a file using an npm Script and Nodemon. We can create a custom npm script to run our project during development. We will create a start script, and a dev script. Using an npm module called nodemon (named from the words node and monitor), we can restart our application automatically upon file changes.
By the end of this tutorial, you'll be able to:
Understand how to create an npm script
Describe how devDependencies are handled from npm scripts
Describe why we might want nodemon to ignore files
Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.