Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate figwheel with ring server to get back-end auto-reload?

I am new to clojure/clojurescript web development.

  1. Use lein ring server and the modifications(for example routes) will be automatically reloaded to the server(hot-deploy).
  2. Use lein figwheel, and it will spy on the changes of cljs source files and updated to the page accordingly.

Now I started figwheel and modified the back-end code(for example the routes). After I reload the page, the modified contents was not updated.

So Is there a way to integrate figwheel with the ring server so that the back-end change can be updated automatically?

like image 645
LotAbout Avatar asked May 16 '15 02:05

LotAbout


1 Answers

The ring middleware wrap-reload will do this for you. There is also a very nice leiningen template called Chestnut which will set up a project for you with Figwheel and an auto reloading Ring backend.

This question shows an example of wrap-reload usage Compojure development without web server restarts

like image 159
Daniel Compton Avatar answered Sep 28 '22 05:09

Daniel Compton