Description
Documentation of app.listen([port[, host[, backlog]]][, callback]) states:
This method is identical to Node’s http.Server.listen().
However, this is not true. In particular, calls to the callback differ.
See, for example expressjs/express#6191.
The new behaviour is documented in the migration guide: https://expressjs.com/en/guide/migrating-5.html
But the 5.x app.listen documentation still incorrectly indicates the express function is identical to the node http.Server.listen() function and does not document the details of callback calling that are unique to Express 5.x. This makes it difficult to understand what is happening when there are errors from the server (e.g. port already in use), if one is not following the migration guide.
It would be helpful if the 5.x documentation was updated to remove the statement that Express' listen() is identical to nodes http.Server.listen() and to document the Express specific handling of the callback.
but the difference is not documented.
Expectations
The 5.x documentation of app.listen() should not state that app.listen() is identical to nodes' https.Server.listen() and it should document the Express specific handling of the callback arguments.
Description
Documentation of app.listen([port[, host[, backlog]]][, callback]) states:
However, this is not true. In particular, calls to the callback differ.
See, for example expressjs/express#6191.
The new behaviour is documented in the migration guide: https://expressjs.com/en/guide/migrating-5.html
But the 5.x app.listen documentation still incorrectly indicates the express function is identical to the node http.Server.listen() function and does not document the details of callback calling that are unique to Express 5.x. This makes it difficult to understand what is happening when there are errors from the server (e.g. port already in use), if one is not following the migration guide.
It would be helpful if the 5.x documentation was updated to remove the statement that Express' listen() is identical to nodes http.Server.listen() and to document the Express specific handling of the callback.
but the difference is not documented.
Expectations
The 5.x documentation of app.listen() should not state that app.listen() is identical to nodes' https.Server.listen() and it should document the Express specific handling of the callback arguments.