Nodemon is a useful tool to react to code changes. I use it all the time when working on Nodejs backend.
Here are three useful options I have learnt today:
--exec allows one to run non node code.
Example: nodemon
--exec 'mocha tests/*'
. Note the single quotes after the exec option.
--ignore to ignore changes made to a file whose name follow a specific pattern.
Example: nodemon --ignore README.md --ignore package.json
. Note that you must repeat the option for every new pattern.
--watch to react only on changes made to the files whose name follow a specific pattern.
Example: nodemon --watch src/*.
The nodemon package page documentation can be found here.
Comments
Post a Comment