Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Can't set bind address #194

Closed
suchipi opened this issue Jul 26, 2016 · 8 comments
Closed

Can't set bind address #194

suchipi opened this issue Jul 26, 2016 · 8 comments

Comments

@suchipi
Copy link

suchipi commented Jul 26, 2016

I decided to try using create-react-app to bootstrap a project in one of those one-click remote browser-based dev environments. However, because the app only binds to localhost, I couldn't connect to it (remote environment runs in a container, and you have to manually expose ports).

It'd be nice to be able to specify the bind address.

@gaearon
Copy link
Contributor

gaearon commented Jul 26, 2016

I think this is fixed in master. Would 0.0.0.0 work better for you?

@suchipi
Copy link
Author

suchipi commented Jul 26, 2016

Yeah; I ejected and changed it to 0.0.0.0, but I also had to edit the webpack config so that the websocket for notifying the page of refreshes would connect to the right place. I had to hardcode the hostname there, so I'm not sure what the right solution is.

By the way, the ejected scripts/src/config structure is really nice 😃

@gaearon
Copy link
Contributor

gaearon commented Jul 26, 2016

@suchipi Can you test whether this also fixes the issue for you? And whether page refreshes would work with this solution?

@gaearon
Copy link
Contributor

gaearon commented Jul 26, 2016

one of those one-click remote browser-based dev environments

Curious, which one are you using?

@suchipi
Copy link
Author

suchipi commented Jul 26, 2016

I'm using Nitrous.io.

I'll test that out tonight (after work).

@suchipi
Copy link
Author

suchipi commented Jul 27, 2016

The bind address is correctly set for the server on master, so you can connect to the application via its external IP.
However, the client still tries to connect to webpack's websocket via localhost:

Chrome Dev Tools showing Websocket connection failures

@gaearon
Copy link
Contributor

gaearon commented Jul 27, 2016

OK, thanks for the info. I’ll file this as a bug and revisit later.

@gaearon
Copy link
Contributor

gaearon commented Jul 27, 2016

Nitrous should work with latest alpha. Please give it a try and let me know. #190

@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants