It's such a pain during the development of node.js apps that we often forget to restart our app after the changes are made in the source code of the app. And even if we are diligent enough to remember and restart the node server after every change, it is still a pain.
node-supervisor comes to the rescue. It's easy to use, simply install it and start your noe app with its command.
Step 1: Install with global flag
$ npm install supervisor -g
Step 2: Use supervisor to start your app instead of node command
$ supervisor app.js
Step 3: Go do your development :)
* if you want to watch for a custom list of file extensions, use the -e switch as below:
$ supervisor -e "js | ejs | node | coffee" app.js
* and..there are plenty of other options that you can use. For more look at the readme file of the project in github.
Alternatives that folks in the communities use whose advantages I'm not aware of as yet are below:
And yeah, you know of better tools for this problem? Do feel free to drop your comments.