Global modules
One of the major complaints I get is the fact that students have to restart the app from the Terminal every time they want to see the changes they just made inside their text editor. So, in this section, we'll take a look at how we can automatically restart our app as we make changes to the file. That means if I change from Gary
to Mike
and save it, it will automatically restart over in the Terminal.
Installing the nodemon module
Now, to automatically restart our app as we make changes to a file, we have to install a command-line utility, and we'll do this using npm. To get started, we'll go to Google Chrome (or the browser you are using) and head over to https://www.npmjs.com, as we did previously in the Installing thelodashmodule in our app section, and the module we're looking for is called nodemon.
The nodemon
will be responsible for watching our app for changes and restarting the app when those changes occur. Right here, as we see in the following screenshot, we can view...