You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Activity
stale commentedon Oct 11, 2019
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
jsejcksn commentedon Oct 12, 2019
Can someone triage this?
ianschmitz commentedon Oct 13, 2019
Sounds reasonable. Want to send a PR updating the docs?
jsejcksn commentedon Oct 14, 2019
Done.