Counterclockwise HTTP REPL
Asked Answered
S

1

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:

Secede answered 16/5, 2013 at 17:21 Comment(7)
Have you tried standard app deploying/consuming techniques? i.e. run a repl in the server, open the port in the client, etc.Frauenfeld
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.Secede
Could this answer help? #12309998Inauspicious
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://<some-address> ( = remotely).Secede
What exactly is the problem? :) drawbridge is the one. Are you getting any error messages etc?Autophyte
No errors, I just can't connect through the dialog (see screenshot). lein repl :connect http://lispark/repl connects, Counterclockwise doesn't.Secede
This might have something to do with the Eclipse proxy settingsEnriqueenriqueta
K
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?

Kellie answered 1/9, 2014 at 15:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.