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
watch
option) and several times faster than EJS and many others.