[docs] Advanced config: HOST description misleading
Created by: jsejcksn
In the advanced configuration page, the description for the HOST
var is
By default, the development web server binds to
localhost
. You may use this variable to specify a different host.
However, that's not quite correct, as it seems to bind to 0.0.0.0
(all available hostnames on the network interface). This can be seen from the console message when running npm run start
:
You can now view react-app in the browser. Local: http://localhost:3000/ On Your Network: http://10.0.1.55:3000/ Note that the development build is not optimized. To create a production build, use npm run build.
This is useful for accessing the development device from other devices on the network, but is undesirable when the developer expects to only be able to access the content via localhost
.
I'm not objecting to the default behavior, but I think that the docs should be updated to reflect what's actually happening. For example, setting
HOST=localhost
in .env
produces the actual behavior in the current description.
I suggest changing to the description to something like:
By default, the development web server binds to all hostnames on the device (
localhost
, LAN network address, etc.). You may use this variable to specify a different host.