is there anything like nodemon that will restart a node app when .ejs file changes?

is there anything like nodemon that works on .ejs file changes?

nodemon will detect changes in .js or .coffee files and restart your node app. But it won't detect changes to view files. I've emailed author, but they are unresponsive.

Maybe this wasn't implemented when you posted the question, but you simply pass the option

-e coffee,js,ejs

See the docs: https://github.com/remy/nodemon

supervisor is an alternative, but when I last used it, it was eating CPU. That may have been fixed by now, but I'd stick with nodemon.

You can use supervisor. https://github.com/isaacs/node-supervisor or npm install supervisor -g

If you need to watch certain files, you just update the -e argument. So you would run something similar to

supervisor -e 'js|ejs|node|coffee' app.js 

use this in your packages.json

"scripts":{
"start":"nodemon -e js,ejs,html -w . -w public -w views -w routes -w models server.js"
}

Supervisor constantly eats ~20% of my CPU

  1. You can wrap ejs with self-written monitor that will watches for file changes and clear template cache.
  2. You can change template engine to one that alredy support hot-reloading. I recommend you ECT. It support automatic template reloading from the box (with watch option) and several times faster than EJS and many others.