Im using a package called "sp-pnp-node". Whenever Im running this file, new "private.json" file would create on the root folder.If I run this file again and again private.json file getting overwriting. So my node server got restarting everytime.
What i need is, is there any way to prevent restart node.js server when this file private.js getting save?.
You need to add this config to your package.json, just add a directory or a file pattern to nodemonConfig in your package.json to ignore them. So, whenever there are any changes in the directory or file pattern that is ignored nodemon won't restart your server.
Sample package.json
{
"name": "nodemon",
"homepage": "http://nodemon.io",
"...": "... other standard package.json values",
"nodemonConfig": {
"ignore": ["*.json"]
}
}
take a look at the documentation for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With