Fork me on GitHub

I'm trying to load Ring's wrap-reload middleware as an interceptor. I think since wrap-reload returns a handler function that an interceptor created from wrap-reload would also necessarily be a handler, and would therefore have to go at the end of the interceptor queue. Is that right?


aha, yeah that looks promising! Thanks!


I'm a little confused about how/where to use this, I wrap the expanded routes var in run-dev? So something like...

;; Routes can be a function that resolve routes,
              ;;  we can use this to set the routes to be reloadable
              ::server/routes #(route/expand-routes (dev-tools/watch-routes-fn (deref #'service/routes)))


or ::server/routes #(dev-tools/watch-routes-fn (route/expand-routes (deref #'service/routes)))?? both of these throw runtime exceptions


@ctamayo, watch should be sufficient. The fact that the run-dev service map uses (deref #'service/routes) leads to the routes being evaluated on every request