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>
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!
(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))
When I open
<http://localhost:80/repl>
I get
[
]
Ok, the problem solved, I was using a wrong port and was calling the handler wrongly 🙂.
btw. is possible to use DrawBridge with HTTPs instead of HTTP?
and it is possible to connect to it in Cursive?
@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.
@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.
Several people have asked about it again recently so I’ll try to take another tilt at it soon.
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.
Got this working by using the port 443 instead of 80. Should be mentioned in https://devcenter.heroku.com/articles/debugging-clojure.
Thanks! I’ll take this over to #cursive since it’s not nrepl related.