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

Change reported host from localhost to :: #35

Closed
wants to merge 1 commit into from
Closed

Change reported host from localhost to :: #35

wants to merge 1 commit into from

Conversation

ldct
Copy link

@ldct ldct commented Oct 19, 2016

pushstate-server and the cli seem to listen to all hosts (:: in ipv6) instead of just localhost. The cli tells the user that it is listening only on localhost, which is inaccurate.

I ran into this while trying out create-react-app's deployment workflow, which suggests using pushstate-server.

@scottcorgan
Copy link
Owner

That's a very good change to make.

How about something more dynamic like:

// ...

let server = app.listen(port, function (err) {
  onStarted(err, server.address().address))
})

return server

which will give you something like:

{ "address": "::", "family": "IPv6", "port": 9000 }

@ldct
Copy link
Author

ldct commented Oct 30, 2016

@scottcorgan you're suggesting to change the signature of the _onStarted callback argument to start, do you consider that to be public API, since it's exported (https://github.com/scottcorgan/pushstate-server/blob/master/index.js#L14)?

@scottcorgan
Copy link
Owner

Ya. I'm ok with a breaking change.

@btipling
Copy link

btipling commented Mar 1, 2017

Maybe consider making that a separate PR and merge this one since this is just updating what is printed on the cli?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants