In Eclipse+Counterclockwise, when I want to connect to REPL, the dialog tells me I can use nREPL over HTTP:
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:
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With