According to the documentation, ignoring the Data.json file requires this command to be executed:
nodemon --ignore Data.json
I tried exactly that and it didn't work. The console kust returned:
Usage: nodemon [nodemon options] [scripts.js] [args]
See "nodemon --help" for more.
Other commands i tried:
nodemon --ignore 'Data.json'
nodemon --ignore "Data.json"
nodemon --ignore '/Data.json'
nodemon --ignore /Data.json
You need to pass your Server.js
to nodemon prior to the ignore
nodemon Server.js --ignore 'Data.json'
Alternatively you can create a nodemon.json
file
{
"verbose": true,
"ignore": ["Data.json"]
}
and then pass this as a commandline argument
nodemon Server.js --config nodemon.json