How to auto-reload files in Node.js?
A good, up to date alternative to supervisor
is nodemon
:
Monitor for any changes in your node.js application and automatically restart the server - perfect for development
To use nodemon
:
$ npm install nodemon -g
$ nodemon app.js
node-supervisor is awesome
usage to restart on save:
npm install supervisor -g supervisor app.js
by isaacs - http://github.com/isaacs/node-supervisor
i found a simple way:
delete require.cache['/home/shimin/test2.js']