简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM