Fork me on GitHub
#chestnut
<
2017-09-29
>
r620316:09:28

I'm fairly new to Clojure/ClojureScript. So pardon me if I'm missing some obvious things... but is there a way to auto reload changed code in a Chestnut project? The cljs reloading (thanks to figwheel) is working fine. In the Chestnut readme it says that a Ring middleware is used to reload server-side code but I can't find any reference to that middleware in the code, nor do I know how the code reloading is supposed to work. Any clue? Thanks!

featheredtoast16:09:32

@robin896 the ring middleware isn't used anymore - chestnut has since moved to component. There are a few methods for reloading server side code now.

featheredtoast16:09:50

You can run (reset) which is the reloaded workflow way. If you're under emacs+cider, (reset) is also called when you run cider-refresh (C-c, C-x). I've also written a separate component that you can include that watches changes to your clj files and can call (reset) for you.

featheredtoast16:09:34

@rgm looks like you'd want to interact with figwheel system api to start the autobuild programmatically - https://github.com/bhauman/lein-figwheel/blob/master/sidecar/src/figwheel_sidecar/system.clj#L299

r620316:09:36

@featheredtoast Alright, (reset) works. Thanks!