Can anyone help me to work out why Ring isn't reloading my namespace?
;;------------------------------------
(ns com.nwalex.sponge.server.core
[:require
[ring.adapter.jetty :as jetty]
[ring.middleware.reload :as reload]])
(defn app [req]
{:status 200
:headers {"Content-Type" "text/html"}
:body "Hello World from Ring"})
(def with-reload-app (reload/wrap-reload app
'(com.nwalex.sponge.server.core)))
;;------------------------------------
I start swank using "lein swank", then connect from Emacs using M-x
slime-connect. I then kick off the server by running:
com.nwalex.sponge.server.core> (def s (jetty/run-jetty with-reload-app
{:port 8080 :join false}))
That's all fine - I can see the output on the browser when I navigate
to http://localhost:8080. But I was expecting to be able to change the
text in :body, save and re-compile, and then see the updated text in
the browser on refresh. It doesn't seem to be working. Can anyone tell
me why?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en