First of all you have to install node.js as described here. To install the livereloadx run:
npm install -g livereloadx
With this command
livereloadx -l -p 35729 src/main/webapp/ --proxy http://localhost:8080/
you can start a proxy server that listens on port 35729 and checks first src/main/webapp/ for requests. If it doesn’t find the resource there it will check http://localhost:8080 for the resource. In my case the devserver run on http://localhost:8080 and the rest interface will respond to any calls that cannot be answered from src/main/webapp.
If you install the chrome plugin from
the chrome store your browser will refresh automatically
UPDATE: It seems that the current version doesn’t handle HTTP POST requests if the “prefer-local” flag is set (the “-l” in the example above). I filed a bug and I hope that this will be fixed soon: https://github.com/nitoyon/livereloadx/issues/3
UPDATE2: It has been fixed. Thank you very much nitoyon!
A ridiculous amount of coffee was consumed in the process of building this project. Add some fuel if you'd like to keep me going!