clojureringboot-clj

Auto Browser Refresh of Ring-Server with Boot


I would like my browser to refresh automatically when I change my ring handler (I'm using Hiccup to generate my html). I'm using the :reload option of serve from boot-http which works fine, but I always have to manually refresh the browser.

Leiningen seems to have an auto-refresh? option, but I couldn't find something similar for boot. There's also ring-refresh, but that's really old and seems incompatible with the latest version of Clojure.

Is there a simple way for boot to refresh the browser after my code changes?


Solution

  • The problem with Ring-Refresh was an outdated dependency on Compojure. Adding the latest version of Compojure as a dependency solves the problem.