Fork me on GitHub
#nrepl
<
2019-12-19
>
Pavel Klavík17:12:42

Hi, trying to get Drawbridge running on my server. I get the following output when trying in lein:

lein repl :connect 

Pavel Klavík17:12:48

Connecting to nREPL at 
ConnectException Connection refused: connect
        .DualStackPlainSocketImpl.connect0 (:-2)
        .DualStackPlainSocketImpl.socketConnect (:-1)
        .AbstractPlainSocketImpl.doConnect (:-1)
        .AbstractPlainSocketImpl.connectToAddress (:-1)
        .AbstractPlainSocketImpl.connect (:-1)
        .PlainSocketImpl.connect (:-1)
        .SocksSocketImpl.connect (:-1)
        .Socket.connect (:-1)
        org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket (PlainConnectionSocketFactory.java:75)
        org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect (DefaultHttpClientConnectionOperator.java:142)
        org.apache.http.impl.conn.BasicHttpClientConnectionManager.connect (BasicHttpClientConnectionManager.java:323)
        org.apache.http.impl.execchain.MainClientExec.establishRoute (MainClientExec.java:381)
Bye for now!

Pavel Klavík17:12:39

(defn drawbridge-handler
  []
  (-> (drawbridge/ring-handler)
      util/wrap-log-request-and-response
      (defaults/wrap-defaults (assoc-in defaults/api-defaults [:params :nested] true))
      session/wrap-session))

Pavel Klavík17:12:40

When I open

I get
[

]

Pavel Klavík17:12:03

Ok, the problem solved, I was using a wrong port and was calling the handler wrongly 🙂.

Pavel Klavík19:12:58

btw. is possible to use DrawBridge with HTTPs instead of HTTP?

Pavel Klavík20:12:37

Got this working by using the port 443 instead of 80. Should be mentioned in https://devcenter.heroku.com/articles/debugging-clojure.

Pavel Klavík19:12:08

and it is possible to connect to it in Cursive?

cfleming20:12:12

@pavel.klavik Unfortunately I tried to get drawbridge working in Cursive and I couldn’t. I meant to file an issue in the nrepl repo about it but never got around to it.

Pavel Klavík20:12:43

@cfleming Would be great to have it since REPL in shell sucks compared to Cursive. But it will be sufficient for us at least for now.

cfleming20:12:23

Several people have asked about it again recently so I’ll try to take another tilt at it soon.

Pavel Klavík20:12:22

Btw. thx for amazing Cursive, running on it for about a year and we are very happy with it. One quality of life improvement would be this: https://github.com/cursive-ide/cursive/issues/2258.

cursive 1
cfleming20:12:40

Thanks! I’ll take this over to #cursive since it’s not nrepl related.