- Watching given folder
- On change runs command (to recompile, etc)
- Notify every client to reload the page
- Client automatically reloads the page
Very useful, when you cannot use hot swap, and need to force reloading the page.
npm install
node browser-reload.js --dir <YOUR_DIR_TO_WATCH> --cmd <YOUR_COMMAND_TO_RUN_ON_CHANGE> --port <SERVER_PORT_TO_LISTEN>
<script src='http://localhost:<SERVER_PORT_TO_LISTEN>/browser-reload-client.js'></script>