Skip to content

Commit c0e414b

Browse files
Update content/middlewares.md
Co-authored-by: Micael Levi L. Cavalcante <[email protected]>
1 parent 0223125 commit c0e414b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/middlewares.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,9 @@ app.use(logger);
243243
await app.listen(3000);
244244
```
245245

246-
#### Default body-praser middleware
247-
The nest application registers `json` and `urlencoded` from the package `body-parser` by default. This can be turned off by setting the `bodyParser` flag when creating the application. The options used when registering the middleware can be seen in the `registerParserMiddleware` function in the (express)[https://github.com/nestjs/nest/blob/master/packages/platform-express/adapters/express-adapter.ts#L210] and (fastify)[https://github.com/nestjs/nest/blob/master/packages/platform-fastify/adapters/fastify-adapter.ts#L455] adapters.
246+
#### Default body parser middleware
247+
248+
When using the `express` adapter, the NestJS app will register `json` and `urlencoded` from the package `body-parser` by default. This can be turned off by setting the `bodyParser` flag to `false` when creating the application.
248249

249250
```typescript
250251
const app = await NestFactory.create(AppModule, {bodyParser: false});

0 commit comments

Comments
 (0)