| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The `net`, `tls`, `http` and `https` module have the same `server.listen()` method, but have a different documenation. Changed to a consistent link to the documentation of the `net` module.
The `https.createServer()` function is above some `https.Server` methods. Move `server.close()` and `server.listen()` to the correct position.
|
Ping @nodejs/documentation: Can we get some reviews for this? |
Sorry, something went wrong.
| *Note*: The `server.listen()` method can be called again if and only if there was an error | ||
| during the first `server.listen()` call or `server.close()` has been called. | ||
| Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. | ||
| Start a server listening for connections. This method is identical to [`server.listen()`][] from [`net.Server`][]. |
There was a problem hiding this comment.
I wouldn't put this as
This method is identical to [`server.listen()`][] from [`net.Server`][].
because it starts a HTTP server, not a bare TCP/IPC server. IMO a better way to put this would be something like:
Starts the HTTP server listening for connections. This method has the same signatures as [`server.listen()`][] from [`net.Server`][].
Sorry, something went wrong.
There was a problem hiding this comment.
Actually the two methods are equal net.Server.prototype.listen === http.Server.prototype.listen. So a compromise would be:
Starts the HTTP server listening for connections. This method is identical to [`server.listen()`][] from [`net.Server`][].
Sorry, something went wrong.
| --> | ||
| - `callback` {Function} | ||
|
|
||
| See [`http.close()`][] for details. |
There was a problem hiding this comment.
http.close() is a little bit ambiguous. Maybe
See [`server.close()`][`http.close()`] from the HTTP module for details.
Sorry, something went wrong.
There was a problem hiding this comment.
I only moved the description of http.close() to another location. But it would be a nice change to make the description better.
Sorry, something went wrong.
|
@mgjm can you please address @joyeecheung comments?. Also please break lines at 80 chars. |
Sorry, something went wrong.
The different server.listen() methods are all the same function but result in different servers listening for connections. This fact is now also documented.
The documentation of `server.close()` in the https module only links to the documentation in the http module and is a bit ambiguous. Changed the documentation in the https module to clarify the relation.
|
Sorry for the delay. |
Sorry, something went wrong.
| [`net.Server.listen(path)`]: net.html#net_server_listen_path_backlog_callback | ||
| [`net.Server.listen(port)`]: net.html#net_server_listen_port_host_backlog_callback | ||
| [`net.Server`]: net.html#net_class_net_server | ||
| [`server.listen()`]: net.html#net_server_listen |
There was a problem hiding this comment.
All of these should be in the sorted order.
Sorry, something went wrong.
There was a problem hiding this comment.
I am not certain if there is a lint rule for things like this but this would be pretty neat!
Sorry, something went wrong.
There was a problem hiding this comment.
I would like to address this in another PR and write some automation / linting to check for the order of the documented methods as well as the order of the links
Sorry, something went wrong.
|
still LGTM |
Sorry, something went wrong.
The `net`, `tls`, `http` and `https` module have the same `server.listen()` method, but have a different documenation. Changed to a consistent link to the documentation of the `net` module. PR-URL: #16020 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
Landed in 278f653 Thanks for the PR, and congratulations on becoming a Node.js Contributor 🎉 ! |
Sorry, something went wrong.
|
hey @nodejs/collaborators would someone be willing to backport this to v8.x-staging? |
Sorry, something went wrong.
The `net`, `tls`, `http` and `https` module have the same `server.listen()` method, but have a different documenation. Changed to a consistent link to the documentation of the `net` module. PR-URL: nodejs#16020 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
The `net`, `tls`, `http` and `https` module have the same `server.listen()` method, but have a different documenation. Changed to a consistent link to the documentation of the `net` module. PR-URL: nodejs/node#16020 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
The `net`, `tls`, `http` and `https` module have the same `server.listen()` method, but have a different documenation. Changed to a consistent link to the documentation of the `net` module. PR-URL: #16020 Backport-PR-URL: #16435 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
The `net`, `tls`, `http` and `https` module have the same `server.listen()` method, but have a different documenation. Changed to a consistent link to the documentation of the `net` module. PR-URL: #16020 Backport-PR-URL: #16435 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label. |
Sorry, something went wrong.
The `net`, `tls`, `http` and `https` module have the same `server.listen()` method, but have a different documenation. Changed to a consistent link to the documentation of the `net` module. PR-URL: nodejs/node#16020 Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
Currently working through some backports & since this appears to have been backported to v8.x already we may want to remove the backport-requested-v8.x label :) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
First commit:
The net, tls, http and https module have the same
server.listen() method, but have a different documenation.
Changed to a consistent link to the documentation of the net module.
Fixes #11915
Second commit:
The https.createServer() function is above some https.Server
methods. Move server.close() and server.listen() to the correct
position.
Checklist
Affected core subsystem(s)