Answered
In my Node.js application, I use Nodemon to automatically restart my application when I make a code change.
But I have a specific JSON file that gets updated that I don't want the application to restart for.
How can I configure Nodemon to ignore that file?
Nodemon has an --ignore
flag you can add to the nodemon
command.
Ignore a file:
nodemon ignore lib/data.json
You can also do a pattern to ignore changes in all json
files:
nodemon --ignore '*.json'
Check out their documentation: https://github.com/remy/nodemon#ignoring-files.
You can simply add a --ignore
flag to it:
nodemon --ignore lib/app.js