5

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?

1 Answer 1

1

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) {
  ...
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.