Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #7671
Closed
Open
Issue created Sep 11, 2019 by Administrator@rootContributor

[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.

Assignee
Assign to
Time tracking