Replies: 3 comments
-
We can document it, though the behavior is whatever the version of Node.js you are running is. For Express 4, that is Node.js 0.10, all three io.js, and up to currently Node.js. I you can confirm all of those have the same behavior when host is omitted, we could add whatever that behavior is to our docs (but probably add that it could change with future Node.js versions, regardless if you didn't upgrade your Express version). |
Beta Was this translation helpful? Give feedback.
-
I've run the tests using GitHub Actions. In Node.js 0.10, it returns |
Beta Was this translation helpful? Give feedback.
-
@bjohansebas I saw you converted this from an issue into a discussion. Has your answer above been documented somewhere now? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, first of all, thanks so much for Express and the ecosystem, very foundational project! 🙌
Just wanted to ask whether the Express team would be open to maintaining a sentence in the docs about what the default values are for
host
when usingapp.listen()
with only a port. Currently, in the Express 4 and 5 docs, only the behavior of an omittedport
argument is documented - the behavior when omitting thehost
is not mentioned:app.listen()
app.listen()
Maybe something similar to the Express 2.0 docs (maybe also with a disambiguation of
INADDR_ANY
):https://expressjs.com/2x/guide.html#:~:text=When%20host%20is%20omitted%20all%20connections%20will%20be%20accepted%20via%20INADDR_ANY.
I guess this issue contains one of the closest descriptions of the behavior here:
Beta Was this translation helpful? Give feedback.
All reactions