I'm using 'nodemon' to restart node on file changes. However it doesn't seem to trigger when json files have changed. Anyone know if there is a way to set this up?
Also, is there a programmatic way to restart from within the running app itself? I suppose running it with 'forever' and throwing an error would do it. Any pointers much appreciated
You can specify nodeman configs within package.json file also
"nodemonConfig": {
"ext": "js, ts, graphql, json"
}
Marciej's approach worked for me:
nodemon -e js,html
You can also configure this in a nodemon.json
config file. Here's how we're currently using it:
{
"execMap": {
"js": "node --harmony"
},
"script": "server.js",
"ext": "js html"
}
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