Reputation: 413
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?.
Upvotes: 3
Views: 8615
Reputation: 2023
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.
Upvotes: 6