I recommend not using lein-ring at all. shows all it takes to start up a ring server: https://github.com/yogthos/luminus/blob/master/src/luminus/repl.clj
On Fri, May 23, 2014 at 1:06 PM, Mark Fisher <[email protected]>wrote: > is it possible to get piggieback working in a situation where the nrepl is > started by :ring settings in my project.clj file? > > I have something like: > > :ring {:handler my.handler/app :nrepl {:start? true :port 9001}} > :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]} > > when i run "lein ring server-headless" it starts my nrepl, and I can > connect to it (via cider), but if I try (pb/cljs-repl) it gives various > "root binding of *cljs-repl-options*" errors. Reading around, this is > mentioned (https://github.com/cemerick/piggieback/issues/7) as being a > middleware problem. > > if i manually create a jetty server calling the same my.handler/app, it > works fine, I can call piggieback to create the cljs nrepl: > > (defroutes app-routes > (GET "/" [] (resp/redirect "/index.html"))) > > (def app > (handler/site app-routes)) > > (defn run > [] > (defonce ^:private server > (ring.adapter.jetty/run-jetty app {:port 3000 :join? false})) > server) > > ;; run cider-jack-in, then... > > (run) > #<Server org.eclipse.jetty.server.Server@184aae06> > >(pb/cljs-repl) > Type `:cljs/quit` to stop the ClojureScript REPL > nil > > I haven't changed my project file, so I'm wondering where I have to put > the middleware settings or what I have to change to get the ring version of > nrepl to work. > > cheers, > mark > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
