boot-cljs-repl icon indicating copy to clipboard operation
boot-cljs-repl copied to clipboard

remote repl

Open sonwh98 opened this issue 8 years ago • 5 comments

I am pair programming on a remote server using tmux. when I run (start-repl) , the browser repl tries to connect ws://localhost. It should connect to the remote host not localhost. How can this be changed so that the browser connects to the repl running on the remote server not on my localhost?

thanks!

sonwh98 avatar May 11 '16 10:05 sonwh98

you should specify the

:ws-host

parameter on both the cljs-repl, and reload tasks.

My setup:

(1) browser on localhost (2) boot serve, cljs-repl, reload, etc... running on remote server

However, but even after setting the :ws-host param on cljs-repl and reload tasks, I still get errors. From a repl I do:

boot.user=> (start-repl) << started Weasel server on ws://127.0.0.1:45591 >> << waiting for client to connect ... Connection is ws://v5.spicevan.com:45591 Writing boot_cljs_repl.cljs...

Then I reload my browser and I get:

WebSocket connection to 'ws://v5.spicevan.com:45591/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED repl.cljs:82WebSocket error g…g.net.W…t.ErrorEvent {type: "error_1", target: g…g.net.WebSocket, currentTarget: g…g.net.WebSocket, propagationStopped_: false, defaultPrevented: false…} repl.cljs:77Closed Websocket REPL connection client.cljs:39 Reload websocket connected. 

ftravers avatar May 12 '16 19:05 ftravers

I have exactly the same issue.

gilesejb avatar Jul 22 '16 19:07 gilesejb

Try setting IP option to select which network interface the server will listen on. 0.0.0.0 should listen on all interfaces.

Deraen avatar Jul 22 '16 20:07 Deraen

ah - thank you!

gilesejb avatar Jul 22 '16 23:07 gilesejb

this doesn't work with (cljs-repl)

karneaud avatar Jul 23 '16 04:07 karneaud