nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
2019-12-19T17:32:42.000900Z

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

lein repl :connect <http://localhost:80/repl>

2019-12-19T17:32:48.001200Z

Connecting to nREPL at <http://localhost:80/repl>
ConnectException Connection refused: connect
        <http://java.net|java.net>.DualStackPlainSocketImpl.connect0 (:-2)
        <http://java.net|java.net>.DualStackPlainSocketImpl.socketConnect (:-1)
        <http://java.net|java.net>.AbstractPlainSocketImpl.doConnect (:-1)
        <http://java.net|java.net>.AbstractPlainSocketImpl.connectToAddress (:-1)
        <http://java.net|java.net>.AbstractPlainSocketImpl.connect (:-1)
        <http://java.net|java.net>.PlainSocketImpl.connect (:-1)
        <http://java.net|java.net>.SocksSocketImpl.connect (:-1)
        <http://java.net|java.net>.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!

2019-12-19T17:33:39.001600Z

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

2019-12-19T17:39:40.002200Z

When I open

<http://localhost:80/repl>
I get
[

]

2019-12-19T17:42:03.002700Z

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

2019-12-19T19:45:58.003300Z

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

2019-12-19T19:46:08.003600Z

and it is possible to connect to it in Cursive?

cfleming 2019-12-19T20:13:12.004400Z

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

2019-12-19T20:17:43.005400Z

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

cfleming 2019-12-19T20:18:23.005900Z

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

2019-12-19T20:19:22.006900Z

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.

1
2019-12-19T20:20:37.007100Z

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

cfleming 2019-12-19T20:20:40.007400Z

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