Nodemon Cheatsheet
Nodemon helps NodeJS applications to restart on file changes
Installation
npm install -g nodemon
Installing as development dependency, specific to project
npm install --save-dev nodemon
Starting application with nodemon
If you are doing node index.js
to start your NodeJS application, then start doing the following to start with Nodemon
nodemon index.js
Monitoring multiple directories
By default Nodemon monitors current working directory, If you want override that behaviour with your specific directories, you can do the following
nodemon --watch server --watch docs --watch client server/index.js
In this case Nodemon watches ./server
, ./docs
. ./client
folders