We have a central server on which we host the environments of all our developers. We have nginx running which proxies requests to uwsgi application servers.
We have now started using webpack and we will end up running webpack-dev-server per developer. What I want to do is make webpack-dev-server run on a unix socket (so that we are not eating up ports) and proxy all the requests to this webpack-dev-server via nginx.
I was looking at the webpack-dev-server code on github and noticed that it accepts only a host and port as options.
Has anyone tried doing this before?
It's not pretty, but if you pass the socket path as the --port
argument it should work.
Example:
webpack-dev-server --port tmp/webpack_socket
It works because port is the first parameter passed to server.listen
. Here's a snippet from the webpack-dev-server.js file where the server is started:
new Server(...).listen(options.port, options.host, function(err) {
...
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With