-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Is there a way to send hot updates through Unix socket? #709
Comments
Typically, I'm using dev server in socket mode together with nginx:
@everthis can you please explain what is your usecase? How do you connecting to that socket? |
@resure Thanks, the |
It sounds like you and I have similar setups, except I can't get it to work. After trying nearly everything and purpling all my google searches I keep getting this in the Chrome network inspector:
( I'm using a VPS for my dev environment. Running webpack dev server and nginx.
Can you explain how you set this up? I'm using this:
How do you set this? If I set anything other than
Any help would be greatly appreciated! |
@vcavallo here is my nginx setup:
I've recently switched to webpack hot middleware, but overall scheme should still be same. Maybe you have connection problems, like in #416? |
version:
2.1.0-beta.12
use case:
Webpack-dev-server runs on remote machine and cooperate with remote backend server(the backend server has been bound to unix socket ), And the entry of the whole webapp is something like this
http://10.0.0.9:8678
.I noticed that the
2.1.0-beta.12
versionwebpack-dev-server
can serve bundles through Unix socket with CLI like this--socket shared/sockets/webpack.sock
, but the HMR part will need to set host and port.If I leave the HMR configuration part as defaults, It will send request like this:
,which won't work since the server is
http://10.0.0.9:8678
and nothttp://localhost
I can set the HMR part like this
webpack-dev-server/client?http://0.0.0.0:8679
and do some server configuration to eliminate the CORS error. But this is not elegant.Is there a way to bind the HMR to unix socket so that there is no need to set host and post and do CORS server config?
The text was updated successfully, but these errors were encountered: