adzerk-oss / boot-cljs-repl

Boot task providing a REPL for ClojureScript development.
Eclipse Public License 1.0
72 stars 28 forks source link

remote repl #41

Open sonwh98 opened 8 years ago

sonwh98 commented 8 years ago

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!

ftravers commented 8 years ago

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. 

gilesejb commented 7 years ago

I have exactly the same issue.

Deraen commented 7 years ago

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

gilesejb commented 7 years ago

ah - thank you!

karneaud commented 7 years ago

this doesn't work with (cljs-repl)