Instead of doing: (defonce server (run-jetty my-app {:port 8080 :join? false}))
do: (defonce server (run-jetty #'my-app {:port 8080 :join? false})) This is make the code reload every time you redefine my-app. Also see: http://stackoverflow.com/questions/2706044/how-do-i-stop-jetty-server-in-clojure Stathis On Thursday, 13 June 2013 10:33:15 UTC+1, Stream wrote: > > > 今天看了一下ring代码,想看一下,如何实现热加载clj代码。 > > 我尝试 run-jetty :join true > 导致server被阻塞,然后emacs nrepl 无法热加载代码。 > > 改成 join false,jetty 进程不加入主进程里,才可以正常加载。 > > 我翻查源码,没发现是如何分离server与逻辑代码,从而实现只热加载handler的。 > > 哪位大神能科普一下呢,谢谢 -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.