Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cloud9 and LiveReload #180

Closed
bertday opened this issue Oct 17, 2016 · 2 comments
Closed

Cloud9 and LiveReload #180

bertday opened this issue Oct 17, 2016 · 2 comments

Comments

@bertday
Copy link

bertday commented Oct 17, 2016

I'm trying to run Budo on Cloud9 (a cloud IDE). The host environment only exposes ports 8080, 8081, and 8082, so I decided to run the web server on 8080 and LR on 8081 with this command:

budo scripts/src/index.js:scripts/dist/bundle.js --host $IP --port $PORT --live --live-port=8081

where $IP is 0.0.0.0 and $PORT is 8080. The server starts up and says

[0001] info  Server running at http://0.0.0.0:8080/ (connect)
[0001] info  LiveReload running on 8081

I also added the following snippet to index.html to get my LiveReload browser plugin to support a port other than 35729.

<script>document.write('<script src="http://myproject.c9users.io:8081/livereload.js?snipver=1"></' + 'script>')</script>

So far the web assets are loading fine but LiveReload fails to connect with this error:

WebSocket connection to 'ws://0.0.0.0:8081/livereload' failed: Error in connection establishment: net::ERR_ADDRESS_INVALID

Is there any way I can force it to use the same host that the snippet was downloaded from?

Thanks!

@mattdesl
Copy link
Owner

Sorry about the massive delay in response — but I've been working on an alternative LiveReload backend that doesn't require a second server. This means the LiveReload script is served on the same host/port as the HTTP requests. It will probably resolve cases like yours.

You can follow progress here:
#194

@mattdesl
Copy link
Owner

Should hopefully be all fixed now. Thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants