Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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.

like image 597
chovy Avatar asked Sep 24 '12 05:09

chovy


People also ask

How do I restart node JS apps automatically?

While Nodemon is running, we can manually restart our application. So instead of stopping and restarting Nodemon, we can just type rs and press enter, and Nodemon will restart the server or the running process for us.

Which service can we download to automatically restart your node app when we make changes?

nodemon is a command-line interface (CLI) utility developed by @rem that wraps your Node app, watches the file system, and automatically restarts the process.

What is Nodemon used for in a node JS application?

nodemon is a tool that helps develop Node.js based applications by automatically restarting the node application when file changes in the directory are detected. nodemon does not require any additional changes to your code or method of development. nodemon is a replacement wrapper for node .


1 Answers

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.

like image 53
Will Avatar answered Oct 17 '22 00:10

Will