0

After following the suggested steps at

https://github.com/samestep/boot-refresh

the intended hot-reloading behavior works when using cider-jack-in from inside a boot project.

However, in the following scenario it does not work. consider this boot task:

(deftask dev2 []
  (comp
   (serve 
    :handler 'app.core/handler
    :reload true
    :port 3000
    :httpkit true
    :nrepl {:port 4000})
 (watch) (refresh) ;; doesn't work with or without this line
))

The relevant part is the :nrepl keyword.

After this task is fired, one can connect to a nrepl server at port 4000, which has the advantage of accessing the actual state of the application during development. (see this post for more details)

This can be done via cider-connect. However, in there the hot-reloading is gone. The :reload true option might confuse here, this only triggers a source reload when a http request is done. But I'm looking for the more general approach of boot-refresh.


note: The intention here is to have a live-reloading behavior on the server side, which is similar to concepts known on the client side (figwheel or boot-reload).

Community
  • 1
  • 1
Anton Harald
  • 5,772
  • 4
  • 27
  • 61
  • Hey, thanks for trying out my library! :D Are you attempting to reload Clojure code or ClojureScript code? – Sam Estep Aug 14 '16 at 01:04
  • In this case it's only about server-side clojure code, that needs to be reloaded. In the final project this will be combined with boot-reload for the client-side cljs reloading. – Anton Harald Aug 14 '16 at 08:14
  • I haven't had a lot of experience with `boot-http`; pretty much all I've done with it has been in the context of [Modern ClojureScript](https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-09.md), at which point I wasn't using `boot-refresh`. Could you add an [MCVE](https://stackoverflow.com/help/mcve) to your question that demonstrates the issue you're having? – Sam Estep Aug 14 '16 at 12:22

0 Answers0