Fork me on GitHub
#inf-clojure
<
2022-01-05
>
tianshu16:01:59

Can I use inf-clojure for shadow-cljs? I mean send code to evaluate in cljs repl. How can I connect?

dpsutton16:01:12

shadow-cljs starts up a socket repl so connect to that as normal

dpsutton16:01:09

tl;dr, either a port in .shadow-cljs/socket-repl.port or specify the port with

{...
 :socket-repl
 {:port 9000}
 ...}

tianshu16:01:24

Which command should I use from the inf-clojure side?

tianshu16:01:07

Ohh, I can not omit localhost for Host.

tianshu16:01:11

Thank you!

dpsutton16:01:55

inf-clojure-connect then localhost and whatever port is started up.

dpsutton16:01:42

i think at one point i made a little function that would read the port out of the socket-repl.port file and then do (inf-clojure-connect '("localhost" . that-port)) or whatever shape it expected