diff --git a/_includes/api/en/4x/express.json.md b/_includes/api/en/4x/express.json.md index ffc460193d..ef969b68c5 100644 --- a/_includes/api/en/4x/express.json.md +++ b/_includes/api/en/4x/express.json.md @@ -39,4 +39,13 @@ The following table describes the properties of the optional `options` object. | `type` | This is used to determine what media type the middleware will parse. This option can be a string, array of strings, or a function. If not a function, `type` option is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library and this can be an extension name (like `json`), a mime type (like `application/json`), or a mime type with a wildcard (like `*/*` or `*/json`). If a function, the `type` option is called as `fn(req)` and the request is parsed if it returns a truthy value. | Mixed | `"application/json"` | | `verify` | This option, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error. | Function | `undefined` | - \ No newline at end of file + + +#### Example: Different limits for specific routes + +```js +// Limit 5MB for /upload +app.use('/upload', express.json({ limit: '5mb' })) + +// Default limit for other routes +app.use(express.json()) \ No newline at end of file