Fork me on GitHub
#cursive
<
2019-11-30
>
ro622:11:42

I'm trying to set up a Cursive repl that can connect to my web app running on Heroku. Any recommendations?

cfleming01:12:14

I haven’t actually done this myself, no. Can you expose an arbitrary port from Heroku for an nREPL or socket server?

cfleming03:12:18

Actually, I should have followed that up - if it does allow you to expose a port, probably the easiest thing is to start a socket server: https://clojure.org/reference/repl_and_main#_launching_a_socket_server

cfleming03:12:40

That will require you to be using Clojure 1.8+ and Cursive 1.9.0.

cfleming03:12:10

You should then be able to connect with a remote socket REPL: https://cursive-ide.com/userguide/repl.html#remote-repls

ro605:12:29

Thanks. I don't think an arbitrary port is possible, so I'm thinking of proxying to Drawbridge on the Heroku box, maybe adapting https://github.com/malyn/lein-catapult Just wanted to see if anyone had a cleaner way before digging in.

cfleming20:12:08

@U8LN9KT2N Unfortunately Cursive doesn’t support Drawbridge right now. I made a serious attempt at it recently, but Drawbridge just totally failed to work for me. I didn’t get any useful nREPL support in time so I parked it - this reminds me, I should file an issue over there.

ro620:12:53

I did a quick and dirty adaptation of lein-catapult this morning that got me something at least partially working right away. There are some issues/improvements I'd like to work on, but it's a good start.

ro605:12:11

....or I thought so, definitely hitting some issues now. Every response is :unknown-session. I'm not interested in a yak shave on this one, but I may spend a little time and see if I can get anywhere.