Pages

Wednesday, June 4, 2014

Live reload with grunt-express and grunt-contrib-watch


Making frequent changes to your static content and constantly refreshing your browser to see them take effect can get frustrating at times and sometimes the cache plays a party pooper. If your project uses grunt then can configure it to set up live reload of your changes to your browser. You can set up a watch task that constantly monitors your files for any changes and when it detects a change, it publishes it and refreshes your browser automagically. You can try this bare minimum Gruntfile.js configuration required to setup live reload using 'grunt-express' and 'grunt-contrib-watch'.