Re: a question about running embedded jetty

2013-01-19 Thread faenvie
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 ...

Re: a question about running embedded jetty

2013-01-19 Thread Baishampayan Ghose
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)

Re: a question about running embedded jetty

2013-01-19 Thread faenvie
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

Re: a question about running embedded jetty

2013-01-19 Thread Feng Shen
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

a question about running embedded jetty

2013-01-18 Thread faenvie
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,

Re: a question about running embedded jetty

2013-01-18 Thread Feng Shen
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