On Feb 23, 10:05 pm, Neill Alexander <neillalexan...@gmail.com> wrote:
> 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)))

Basically because wrap-reload is a function, so app is evaluated
before it is passed to wrap-reload.

What you probably want is to encase app in an anonymous function
before passing it in, e.g. #(app %).

- James

-- 
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

Reply via email to