Webpack-dev-server: Responding to localhost as well as dev IP address

Created on 22 Apr 2015  路  3Comments  路  Source: webpack/webpack-dev-server

Is there a way to get the webpack-dev-server to serve content from both localhost but also requests from my local dev machine's IP address, or the name.local OSX address (for when testing from mobile devices)?

At the moment I have to specifically set the host option, which is a little cumbersome when my IP address changes and I don't want to hard code these details in the config script.

Thanks.

question

Most helpful comment

If you set server's listen address to 0.0.0.0 it will listen to whatever address is resolved on your machine. Not secure of course, but if you are only accessible from local network, then you should be ok.

All 3 comments

If you set server's listen address to 0.0.0.0 it will listen to whatever address is resolved on your machine. Not secure of course, but if you are only accessible from local network, then you should be ok.

Exactly what I was looking for, thanks you all.

Closing because it has been answered a while ago.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

movie4 picture movie4  路  3Comments

vzorge picture vzorge  路  3Comments

hnqlvs picture hnqlvs  路  3Comments

uMaxmaxmaximus picture uMaxmaxmaximus  路  3Comments

eyakcn picture eyakcn  路  3Comments