Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Different watch/ignore list for when app has crashed #278

dmmalam opened this Issue · 2 comments

2 participants


Is this currently possible:

I use nodemon for web dev, and it restarts correctly when my nodejs app changes. I however use middleware for css (less) and js(browserify) that can each watch their respective files and can rebundle them as necessary. I therefore put the client js / css in my nodemon ignore list. However if I make a error on the css/js file which crashes the process, I then have to manually restart nodemon as it won't detect the file change.

Ideally you should be allowed to optionally specify different files to watch/ignore when a process has crashed. Or is there a simple hack around this that I'm missing?


So for example:


In server.js you have say watchify to efficiently recomple client.js on file changes.

I would start nodemon with
nodemon --ignore client.js server.js

And this works perfectly 90% of the time, any change in server.js will be detected by nodemon, and any change in client.js will be taken care of by watchify. However if I make an syntax error in client.js, it will crash watchify, which will then crash server.js. I will then go and fix the error in client.js, and save but nothing will pick this up and I would have to restart the process.

Two workarounds are:

  1. make nodemon also monitor also client.js and get rid of watchify, however this slows down dev hugely as a full startup can take 10+ secs, whereas a watchify rebundle is 1 or 2 secs.

  2. Put a try/catch around watchify, and restart it when a file changes. However this would duplicate the tricky file watch logic in multiple places, and isn't full proof.

Ideally I could give a crash ignore/watch option. ie
nodemon --ignore client.js --crash-watch *.js server.js

so watch for changes in server.js, but then it crashes, also monitor for changes in client.js.

Hope this makes sense, it's a rather niche requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.