Skip to content

Commit 6c3cfbb

Browse files
authored
fix: update middleware documentation (#1806)
1 parent 8e2dc7a commit 6c3cfbb

File tree

1 file changed

+23
-37
lines changed

1 file changed

+23
-37
lines changed

en/resources/middleware.md

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,33 @@ module: mw-home
1313
The Express middleware modules listed here are maintained by the
1414
[Expressjs team](https://github.com/orgs/expressjs/people).
1515

16-
|Middleware module | Description | Replaces built-in function (Express 3)|
17-
|---------------------------|---------------------|----------------------|
18-
| [body-parser](/resources/middleware/body-parser.html) | Parse HTTP request body. See also: [body](https://github.com/raynos/body), [co-body](https://github.com/visionmedia/co-body), and [raw-body](https://github.com/stream-utils/raw-body). | express.bodyParser |
19-
| [compression](/resources/middleware/compression.html) | Compress HTTP responses. | express.compress |
20-
| [connect-rid](/resources/middleware/connect-rid.html) | Generate unique request ID. | NA |
21-
| [cookie-parser](/resources/middleware/cookie-parser.html) | Parse cookie header and populate `req.cookies`. See also [cookies](https://github.com/jed/cookies) and [keygrip](https://github.com/jed/keygrip). | express.cookieParser|
22-
| [cookie-session](/resources/middleware/cookie-session.html) | Establish cookie-based sessions.| express.cookieSession |
23-
| [cors](/resources/middleware/cors.html) | Enable cross-origin resource sharing (CORS) with various options.| NA
24-
| [errorhandler](/resources/middleware/errorhandler.html) |Development error-handling/debugging. |express.errorHandler |
25-
| [method-override](/resources/middleware/method-override.html) |Override HTTP methods using header. |express.methodOverride |
26-
| [morgan](/resources/middleware/morgan.html) | HTTP request logger. | express.logger |
27-
| [multer](/resources/middleware/multer.html) | Handle multi-part form data. | express.bodyParser |
28-
| [response-time](/resources/middleware/response-time.html) | Record HTTP response time. |express.responseTime |
29-
| [serve-favicon](/resources/middleware/serve-favicon.html) | Serve a favicon. |express.favicon |
30-
| [serve-index](/resources/middleware/serve-index.html) | Serve directory listing for a given path.| express.directory |
31-
| [serve-static](/resources/middleware/serve-static.html) |Serve static files. |express.static |
32-
| [session](/resources/middleware/session.html) | Establish server-based sessions (development only). | express.session |
33-
| [timeout](/resources/middleware/timeout.html) | Set a timeout period for HTTP request processing.|express.timeout |
34-
| [vhost](/resources/middleware/vhost.html) |Create virtual domains.|express.vhost|
16+
| Middleware module | Description |
17+
| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
18+
| [body-parser](/{page.lang}/resources/middleware/body-parser.html) | Parse HTTP request body. |
19+
| [compression](/{page.lang}/resources/middleware/compression.html) | Compress HTTP responses. |
20+
| [connect-rid](/{page.lang}/resources/middleware/connect-rid.html) | Generate unique request ID. |
21+
| [cookie-parser](/{page.lang}/resources/middleware/cookie-parser.html) | Parse cookie header and populate `req.cookies`. See also [cookies](https://github.com/jed/cookies). |
22+
| [cookie-session](/{page.lang}/resources/middleware/cookie-session.html) | Establish cookie-based sessions. |
23+
| [cors](/{page.lang}/resources/middleware/cors.html) | Enable cross-origin resource sharing (CORS) with various options. |
24+
| [errorhandler](/{page.lang}/resources/middleware/errorhandler.html) | Development error-handling/debugging. |
25+
| [method-override](/{page.lang}/resources/middleware/method-override.html) | Override HTTP methods using header. |
26+
| [morgan](/{page.lang}/resources/middleware/morgan.html) | HTTP request logger. |
27+
| [multer](/{page.lang}/resources/middleware/multer.html) | Handle multi-part form data. |
28+
| [response-time](/{page.lang}/resources/middleware/response-time.html) | Record HTTP response time. |
29+
| [serve-favicon](/{page.lang}/resources/middleware/serve-favicon.html) | Serve a favicon. |
30+
| [serve-index](/{page.lang}/resources/middleware/serve-index.html) | Serve directory listing for a given path. |
31+
| [serve-static](/{page.lang}/resources/middleware/serve-static.html) | Serve static files. |
32+
| [session](/{page.lang}/resources/middleware/session.html) | Establish server-based sessions (development only). |
33+
| [timeout](/{page.lang}/resources/middleware/timeout.html) | Set a timeout perioHTTP request processing. |
34+
| [vhost](/{page.lang}/resources/middleware/vhost.html) | Create virtual domains. |
3535

3636
## Additional middleware modules
3737

3838
These are some additional popular middleware modules.
3939

4040
{% include community-caveat.html %}
4141

42-
|Middleware module | Description |
43-
|---------------------------|---------------------|
44-
| [cls-rtracer](https://github.com/puzpuzpuz/cls-rtracer) | Middleware for CLS-based request id generation. An out-of-the-box solution for adding request ids into your logs.|
45-
| [connect-image-optimus](https://github.com/msemenistyi/connect-image-optimus) | Optimize image serving. Switches images to `.webp` or `.jxr`, if possible.|
46-
| [error-handler-json](https://github.com/mifi/error-handler-json) | An error handler for JSON APIs (fork of `api-error-handler`.)|
47-
| [express-debug](https://github.com/devoidfury/express-debug) | Development tool that adds information about template variables (locals), current session, and so on.|
48-
| [express-partial-response](https://github.com/nemtsov/express-partial-response) | Filters out parts of JSON responses based on the `fields` query-string; by using Google API's Partial Response.|
49-
| [express-simple-cdn](https://github.com/jamiesteven/express-simple-cdn) | Use a CDN for static assets, with multiple host support.|
50-
| [express-slash](https://github.com/ericf/express-slash) | Handles routes with and without trailing slashes.|
51-
| [express-uncapitalize](https://github.com/jamiesteven/express-uncapitalize) | Redirects HTTP requests containing uppercase to a canonical lowercase form.|
52-
| [helmet](https://github.com/helmetjs/helmet) | Helps secure your apps by setting various HTTP headers.|
53-
| [join-io](https://github.com/coderaiser/join-io) | Joins files on the fly to reduce the requests count.|
54-
| [passport](https://github.com/jaredhanson/passport) | Authentication using "strategies" such as OAuth, OpenID and many others. See [http://passportjs.org/](http://passportjs.org/) for more information.|
55-
| [static-expiry](https://github.com/paulwalker/connect-static-expiry) | Fingerprint URLs or caching headers for static assets.|
56-
| [view-helpers](https://github.com/madhums/node-view-helpers) | Common helper methods for views.|
57-
| [sriracha-admin](https://github.com/hdngr/siracha) | Dynamically generate an admin site for Mongoose. |
58-
59-
For more middleware modules, see [http-framework](https://github.com/Raynos/http-framework#modules).
42+
| Middleware module | Description |
43+
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
44+
| [helmet](https://github.com/helmetjs/helmet) | Helps secure your apps by setting various HTTP headers. |
45+
| [passport](https://github.com/jaredhanson/passport) | Authentication using "strategies" such as OAuth, OpenID and many others. See [passportjs.org](https://passportjs.org/) for more information. |

0 commit comments

Comments
 (0)