28

In Eclipse+Counterclockwise, when I want to connect to REPL, the dialog tells me I can use nREPL over HTTP:

Connect to REPL dialog

How to set this up? Is this somehow connected to drawbridge? I haven't been able to make these work together, although lein repl :connect http://my.url/repl worked for me.

For clarity, why this is useful compared to classic REPL: classic REPL works for localhost only. You can bridge it through SSH port tunnelling, but this - REPL over HTTP - is a viable alternative for remote, "live" servers.


Just for completeness, the server side:

Antony Mithun
  • 161
  • 1
  • 15
Martin Janiczek
  • 2,996
  • 3
  • 24
  • 32
  • Have you tried standard app deploying/consuming techniques? i.e. run a repl in the server, open the port in the client, etc. – deprecated May 24 '13 at 09:09
  • Yes, I've done the SSH forwarding etc, it all works fine... This question isn't about making it work somehow, but about HTTP nRepl in Counterclockwise. – Martin Janiczek May 29 '13 at 11:04
  • Could this answer help? http://stackoverflow.com/questions/12309498/evaluation-in-clojure-repl-with-counterclockwise-and-eclipse – Franco Rondini May 30 '13 at 16:58
  • No, that's not it... I'm not having problems with connecting to a REPL per se, but in making nREPL work over HTTP transport - so that anybody who sees the IP can connect to that REPL over http:// ( = remotely). – Martin Janiczek May 31 '13 at 00:04
  • What exactly is the problem? :) drawbridge is the one. Are you getting any error messages etc? – August Lilleaas Aug 05 '13 at 14:16
  • No errors, I just can't connect through the dialog (see screenshot). `lein repl :connect http://lispark/repl` connects, Counterclockwise doesn't. – Martin Janiczek Aug 05 '13 at 20:37
  • This might have something to do with the Eclipse proxy settings – NielsK Apr 23 '14 at 09:23

1 Answers1

1

I've just installed CCW and tried against https://github.com/technomancy/chortles: I did "lein run" after exporting the environment variables suggested there and it connects to http://flynn:reindeerflotilla@localhost:5000/repl like a charm. I tried to evaluate simple expressions and I had no problems at all while the server was up&running. I'm using Leiningen 2.4.3 to run it.

Chortle's sources https://github.com/technomancy/chortles/blob/master/src/chortles/web.clj seem to be quite simple, the main handler is wrapped in drawbridge middleware including session and parameters support too. Does that work for you? Is it feasible to use the same approach for your own application?

circlespainter
  • 836
  • 5
  • 8