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

doc/api: listed server.listen() parameters and made some minor corr… #39984

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/fs.md
Expand Up @@ -2660,7 +2660,7 @@ changes:
Asynchronously creates a directory.
The callback is given a possible exception and, if `recursive` is `true`, the
first directory path created, `(err, [path])`.
first directory path created, `(err[, path])`.
`path` can still be `undefined` when `recursive` is `true`, if no directory was
created.
Expand Down Expand Up @@ -4886,7 +4886,7 @@ Returns the number of `bytesRead`.
For detailed information, see the documentation of the asynchronous version of
this API: [`fs.read()`][].
### `fs.readSync(fd, buffer, [options])`
### `fs.readSync(fd, buffer[, options])`
<!-- YAML
added:
- v13.13.0
Expand Down
6 changes: 5 additions & 1 deletion doc/api/http.md
Expand Up @@ -1290,7 +1290,11 @@ event is emitted on the server object, and (by default) the socket is destroyed.
See [`server.timeout`][] for more information on how timeout behavior can be
customized.

### `server.listen()`
### `server.listen(port[, host][, callback])`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep it as is. server.listen() has multiple signatures. See https://nodejs.org/api/net.html#net_server_listen.


* `port` {number}
* `host` {string}
* `callback` {Function}

Starts the HTTP server listening for connections.
This method is identical to [`server.listen()`][] from [`net.Server`][].
Expand Down
2 changes: 1 addition & 1 deletion doc/api/stream.md
Expand Up @@ -2041,7 +2041,7 @@ await finished(compose(s1, s2, s3));
console.log(res); // prints 'HELLOWORLD'
```

### `stream.Readable.from(iterable, [options])`
### `stream.Readable.from(iterable[, options])`
<!-- YAML
added:
- v12.3.0
Expand Down