Skip to content

Commit

Permalink
Fix typo in overriding-express-api.md (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
meowingwhitey authored Mar 4, 2024
1 parent 6041f55 commit dc01eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion en/guide/overriding-express-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Object.defineProperty(app.request, 'ip', {

## Prototype

In order to provide the Express.js API, the request/response obects passed to Express.js (via `app(req, res)`, for example) need to inherit from the same prototype chain. By default this is `http.IncomingRequest.prototype` for the request and `http.ServerResponse.prototype` for the response.
In order to provide the Express.js API, the request/response objects passed to Express.js (via `app(req, res)`, for example) need to inherit from the same prototype chain. By default this is `http.IncomingRequest.prototype` for the request and `http.ServerResponse.prototype` for the response.

Unless necessary, it is recommended that this be done only at the application level, rather than globally. Also, take care that the prototype that is being used matches the functionality as closely as possible to the default prototypes.

Expand Down

0 comments on commit dc01eec

Please sign in to comment.