boot-refresh inside cider-connect

91 Views Asked by At

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).

0

There are 0 best solutions below