Closed ldct closed 7 years ago
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 }
@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)?
Ya. I'm ok with a breaking change.
Maybe consider making that a separate PR and merge this one since this is just updating what is printed on the cli?
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 usingpushstate-server
.