Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the default value of HOST is prettyHost(localhost) instead of 0.0.0.0? #3747

Closed
hncg opened this issue Apr 3, 2019 · 0 comments
Closed
Labels
bug intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome.

Comments

@hncg
Copy link

hncg commented Apr 3, 2019

What problem does this feature solve?

vue.config.js

module.exports = {
  devServer: {
      port: 5200,
      host: '0.0.0.0',
    },
}

terminal print:

  App running at:
  - Local:   http://localhost:5200/

Shouldn't it be displayed like this?

  App running at:
  - Local:   http://0.0.0.0:5200/

In docker, 'localhost' means that it cannot expose the service to the host unless '0.0.0.0' is used.
In other words, when host is '0.0.0.0', the terminal print 'localhost' is incorrect. May the terminal print '0.0.0.0' would be better?

What does the proposed API look like?

packages/@vue/cli-service/lib/util/prepareURLs.js
at line 33:

//prettyHost = 'localhost'
prettyHost = host
@hncg hncg changed the title Why is the default value of HOST is prettyHost instead of 0.0.0.0? Why is the default value of HOST is prettyHost(localhost) instead of 0.0.0.0? Apr 3, 2019
@sodatea sodatea added bug intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome. labels Jun 19, 2019
sodatea pushed a commit that referenced this issue Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome.
Projects
None yet
Development

No branches or pull requests

2 participants