concept nodemon in category angular

appears as: nodemon
Getting MEAN with Mongo, Express, Angular, and Node.js 2ED

This is an excerpt from Manning's book Getting MEAN with Mongo, Express, Angular, and Node.js 2ED.

Automatically restarting the application with nodemon

Some services have been developed to monitor application code and restart the process when they detect that changes have been made. One such service, and the one you’ll use in this book, is nodemon. nodemon wraps the Node application and, other than monitoring for changes, causes no interference.

To use nodemon, start by installing it globally, much as you did with Express. Use npm in terminal:

$ npm install -g nodemon

When the installation is finished, you’ll be able to use nodemon wherever you want. Using it is simple. Instead of typing node to start the application, you type nodemon. So, making sure that you’re in the loc8r folder in terminal and that you’ve stopped the Node process, if it’s still running, enter the following command:

$ nodemon

You should see a few extra lines output to terminal, confirming that nodemon is running and that it has started node ./bin/www. If you head back over to your browser and refresh, you should see that the application is still there.

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage