Skip to content

Commit 61e6f78

Browse files
authored
docs: update Node.js references in API documentation and guides (#2479)
1 parent 82e69e3 commit 61e6f78

18 files changed

Lines changed: 31 additions & 31 deletions

File tree

src/content/api/3x/api/response/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: An overview of the API response object in Express.js, detailing its
44
---
55

66
The `res` object is an enhanced version of Node's own response object
7-
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#http_class_http_serverresponse).
7+
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#class-httpserverresponse).
88

99
## Properties
1010

src/content/api/4x/api/application/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ app.get('/', function (req: Request, res: Response) {
630630

631631
Binds and listens for connections on the specified host and port, or starts a
632632
UNIX socket and listens for connections on the given path. This method is
633-
identical to Node's [http.Server.listen()](https://nodejs.org/api/http.html#http_server_listen).
633+
identical to Node's [http.Server.listen()](https://nodejs.org/api/http.html#serverlisten).
634634

635635
If port is omitted or is 0, the operating system will assign an arbitrary unused
636636
port, which is useful for cases like automated tasks (tests, etc.).
@@ -699,7 +699,7 @@ http.createServer(app).listen(80);
699699
https.createServer(options, app).listen(443);
700700
```
701701

702-
The `app.listen()` method returns an [http.Server](https://nodejs.org/api/http.html#http_class_http_server) object and (for HTTP) is a convenience method for the following:
702+
The `app.listen()` method returns an [http.Server](https://nodejs.org/api/http.html#class-httpserver) object and (for HTTP) is a convenience method for the following:
703703

704704
```js
705705
app.listen = function () {
@@ -710,7 +710,7 @@ app.listen = function () {
710710

711711
<Alert type="info">
712712

713-
All the forms of Node's [http.Server.listen()](https://nodejs.org/api/http.html#http_server_listen) method are in fact actually supported.
713+
All the forms of Node's [http.Server.listen()](https://nodejs.org/api/http.html#serverlisten) method are in fact actually supported.
714714

715715
</Alert>
716716

src/content/api/4x/api/request/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ app.get('/user/:id', function (request: Request, response: Response) {
4646
```
4747

4848
The `req` object is an enhanced version of Node's own request object
49-
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
49+
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#class-httpincomingmessage).
5050

5151
## Properties
5252

@@ -358,7 +358,7 @@ app.use(function (req: Request, res: Response, next: NextFunction) {
358358
<Alert type="alert">
359359

360360
`req.url` is not a native Express property, it is inherited from Node's [http
361-
module](https://nodejs.org/api/http.html#http_message_url).
361+
module](https://nodejs.org/api/http.html#messageurl).
362362

363363
</Alert>
364364

src/content/api/4x/api/response/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ app.get('/user/:id', function (request: Request, response: Response) {
4747
```
4848

4949
The `res` object is an enhanced version of Node's own response object
50-
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#http_class_http_serverresponse).
50+
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#class-httpserverresponse).
5151

5252
## Properties
5353

@@ -1192,7 +1192,7 @@ Aliased as `res.header(field [, value])`.
11921192
</Signature>
11931193

11941194
Sets the HTTP status for the response.
1195-
It is a chainable alias of Node's [response.statusCode](https://nodejs.org/api/http.html#http_response_statuscode).
1195+
It is a chainable alias of Node's [response.statusCode](https://nodejs.org/api/http.html#responsestatuscode).
11961196

11971197
```js
11981198
res.status(403).end();

src/content/api/5x/api/application/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ app.get('/', (req: Request, res: Response) => {
656656

657657
Binds and listens for connections on the specified host and port, or starts a
658658
UNIX socket and listens for connections on the given path. This method is
659-
identical to Node's [http.Server.listen()](https://nodejs.org/api/http.html#http_server_listen).
659+
identical to Node's [http.Server.listen()](https://nodejs.org/api/http.html#serverlisten).
660660

661661
If port is omitted or is 0, the operating system will assign an arbitrary unused
662662
port, which is useful for cases like automated tasks (tests, etc.).
@@ -741,7 +741,7 @@ http.createServer(app).listen(80);
741741
https.createServer(options, app).listen(443);
742742
```
743743

744-
The `app.listen()` method returns an [http.Server](https://nodejs.org/api/http.html#http_class_http_server) object and (for HTTP) is a convenience method for the following:
744+
The `app.listen()` method returns an [http.Server](https://nodejs.org/api/http.html#class-httpserver) object and (for HTTP) is a convenience method for the following:
745745

746746
```js
747747
app.listen = function () {
@@ -753,7 +753,7 @@ app.listen = function () {
753753
<Alert type="info">
754754

755755
All the forms of Node's
756-
[http.Server.listen()](https://nodejs.org/api/http.html#http_server_listen) method are in fact
756+
[http.Server.listen()](https://nodejs.org/api/http.html#serverlisten) method are in fact
757757
actually supported.
758758

759759
</Alert>

src/content/api/5x/api/request/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ app.get('/user/:id', (request: Request, response: Response) => {
4545
```
4646

4747
The `req` object is an enhanced version of Node's own request object
48-
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
48+
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#class-httpincomingmessage).
4949

5050
## Properties
5151

@@ -350,7 +350,7 @@ app.use((req: Request, res: Response, next: NextFunction) => {
350350
<Alert type="alert">
351351

352352
`req.url` is not a native Express property, it is inherited from Node's [http
353-
module](https://nodejs.org/api/http.html#http_message_url).
353+
module](https://nodejs.org/api/http.html#messageurl).
354354

355355
</Alert>
356356

src/content/api/5x/api/response/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ app.get('/user/:id', (request: Request, response: Response) => {
4646
```
4747

4848
The `res` object is an enhanced version of Node's own response object
49-
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#http_class_http_serverresponse).
49+
and supports all [built-in fields and methods](https://nodejs.org/api/http.html#class-httpserverresponse).
5050

5151
## Properties
5252

@@ -1078,7 +1078,7 @@ Aliased as `res.header(field [, value])`.
10781078
</Signature>
10791079

10801080
Sets the HTTP status for the response.
1081-
It is a chainable alias of Node's [response.statusCode](https://nodejs.org/api/http.html#http_response_statuscode).
1081+
It is a chainable alias of Node's [response.statusCode](https://nodejs.org/api/http.html#responsestatuscode).
10821082

10831083
```js
10841084
res.status(403).end();

src/content/docs/en/4x/guide/debugging.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ $ node --inspect index.js
164164

165165
Then attach a debugging client, such as Chrome DevTools (open `chrome://inspect`), VS Code, or any other inspector-capable tool, to set breakpoints in your route handlers and middleware, step through code, and inspect variables.
166166

167-
If you need to debug something that happens during startup, use `--inspect-brk` instead, which pauses execution on the first line until a debugger attaches. See the [Node.js debugging guide](https://nodejs.org/en/learn/getting-started/debugging) for details.
167+
If you need to debug something that happens during startup, use `--inspect-brk` instead, which pauses execution on the first line until a debugger attaches. See the [Node.js debugging guide](https://nodejs.org/learn/getting-started/debugging) for details.
168168

169169
## Debugging the HTTP layer
170170

src/content/docs/en/4x/guide/overriding-express-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Discover how to customize and extend the Express.js API by overridi
55

66
import Alert from '@components/primitives/Alert/Alert.astro';
77

8-
The Express API consists of various methods and properties on the request and response objects. These are inherited by prototype. There are two extension points for the Express API:
8+
The Express API consists of various methods and properties on the [request](/api/request) and [response](/api/response) objects. These are inherited by prototype. There are two extension points for the Express API:
99

1010
1. The global prototypes at `express.request` and `express.response`.
1111
2. App-specific prototypes at `app.request` and `app.response`.

src/content/docs/en/4x/guide/routing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ app.post('/', (req: Request, res: Response) => {
8888
Express supports methods that correspond to all HTTP request methods: `get`, `post`, and so on.
8989
For a full list, see [app.METHOD](/api/application#appmethod).
9090

91-
There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#http_http_methods).
91+
There is a special routing method, `app.all()`, used to load middleware functions at a path for _all_ HTTP request methods. For example, the following handler is executed for requests to the route `"/secret"` whether using `GET`, `QUERY`, `POST`, `PUT`, `DELETE`, or any other HTTP request method supported in the [http module](https://nodejs.org/api/http.html#httpmethods).
9292

9393
```js
9494
app.all('/secret', (req, res, next) => {
@@ -555,7 +555,7 @@ app.get(
555555

556556
## Response methods
557557

558-
The methods on the response object (`res`) in the following table can send a response to the client, and terminate the request-response cycle. If none of these methods are called from a route handler, the client request will be left hanging.
558+
The methods on the [response object](/api/response) (`res`) in the following table can send a response to the client, and terminate the request-response cycle. If none of these methods are called from a route handler, the client request will be left hanging.
559559

560560
| Method | Description |
561561
| ----------------------------------------------- | ------------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)