https://github.com/ring-clojure/ring/wiki/Interactive-Development
Ensure that:
- Your Ring adapter is running in a background thread so it doesn't
block your REPL.
- Your handler function is wrapped in a var, so it will be updated when
you reload the namespace.
aha ...
On Sat, Jan 19, 2013 at 5:24 AM, faenvie fanny.aen...@gmx.de wrote:
i have learned that for a ring/compojure-app the embedded jetty
service can be started like this:
(def app (handler/site routes))
(defn start [port]
(ring/run-jetty (var app) {:port (or port 8080)
very helpful answer. thank you Baishampayan.
On Saturday, January 19, 2013 10:26:06 AM UTC+1, Baishampayan Ghose wrote:
On Sat, Jan 19, 2013 at 5:24 AM, faenvie fanny@gmx.de javascript:
wrote:
i have learned that for a ring/compojure-app the embedded jetty
service can be started
I did not know #'app is for reload. It's very helpful. Thanks.
On Saturday, January 19, 2013 5:26:06 PM UTC+8, Baishampayan Ghose wrote:
On Sat, Jan 19, 2013 at 5:24 AM, faenvie fanny@gmx.de javascript:
wrote:
i have learned that for a ring/compojure-app the embedded jetty
service
dear clojure users,
i have learned that for a ring/compojure-app the embedded jetty
service can be started like this:
(def app (handler/site routes))
(defn start [port]
(ring/run-jetty (var app) {:port (or port 8080)
:join? false}))
can anyone explain,
Hi:
(var app) can be simplified to just app.
The detail:
app is a function: accept a request map, return a response map. your
server's logic is in app.
( see ring spec https://github.com/ring-clojure/ring/blob/master/SPEC for
more detail)
(var app) or #'app: get the var (clojure.lang.Var) of