Skip to content

Commit c86d5a4

Browse files
Remove body-parser from examples
1 parent c7ff78f commit c86d5a4

17 files changed

Lines changed: 0 additions & 27 deletions

File tree

examples/01-cats-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"@nestjs/microservices": "^4.0.1",
2020
"@nestjs/testing": "^4.0.1",
2121
"@nestjs/websockets": "^4.0.1",
22-
"body-parser": "^1.17.2",
2322
"class-transformer": "^0.1.7",
2423
"class-validator": "^0.7.2",
2524
"redis": "^2.7.1",

examples/01-cats-app/src/server.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
import * as bodyParser from 'body-parser';
21
import { NestFactory } from '@nestjs/core';
32
import { ApplicationModule } from './modules/app.module';
43
import { ValidationPipe } from './modules/common/pipes/validation.pipe';
54

65
async function bootstrap() {
76
const app = await NestFactory.create(ApplicationModule);
8-
9-
app.use(bodyParser.json());
107
app.useGlobalPipes(new ValidationPipe());
11-
128
await app.listen(3000);
139
}
1410
bootstrap();

examples/02-gateways/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@nestjs/microservices": "^4.0.1",
1515
"@nestjs/testing": "^4.0.1",
1616
"@nestjs/websockets": "^4.0.1",
17-
"body-parser": "^1.17.2",
1817
"class-transformer": "^0.1.7",
1918
"class-validator": "^0.7.2",
2019
"redis": "^2.7.1",

examples/02-gateways/src/server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import * as bodyParser from 'body-parser';
21
import { NestFactory } from '@nestjs/core';
32
import { ApplicationModule } from './modules/app.module';
43

54
async function bootstrap() {
65
const app = await NestFactory.create(ApplicationModule);
7-
app.use(bodyParser.json());
86
await app.listen(3000);
97
}
108
bootstrap();

examples/03-microservices/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"@nestjs/testing": "^4.0.1",
1616
"@nestjs/websockets": "^4.0.1",
1717
"amqplib": "^0.5.1",
18-
"body-parser": "^1.17.2",
1918
"class-transformer": "^0.1.7",
2019
"class-validator": "^0.7.2",
2120
"redis": "^2.7.1",

examples/03-microservices/src/server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as bodyParser from 'body-parser';
21
import { NestFactory } from '@nestjs/core';
32
import { ApplicationModule } from './modules/app.module';
43
import { Transport } from '@nestjs/microservices';
@@ -9,7 +8,6 @@ async function bootstrap() {
98
transport: Transport.TCP,
109
});
1110

12-
app.use(bodyParser.json());
1311
await app.startAllMicroservicesAsync();
1412
await app.listen(3001);
1513
}

examples/04-injector/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@nestjs/microservices": "^4.0.1",
1515
"@nestjs/testing": "^4.0.1",
1616
"@nestjs/websockets": "^4.0.1",
17-
"body-parser": "^1.17.2",
1817
"redis": "^2.7.1",
1918
"reflect-metadata": "^0.1.10",
2019
"rxjs": "^5.4.3",

examples/04-injector/src/server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import * as bodyParser from 'body-parser';
21
import { NestFactory } from '@nestjs/core';
32
import { ApplicationModule } from './modules/app.module';
43

54
async function bootstrap() {
65
const app = await NestFactory.create(ApplicationModule);
7-
app.use(bodyParser.json());
86
await app.listen(3001);
97
}
108
bootstrap();

examples/05-sql-typeorm/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@nestjs/microservices": "^4.0.1",
1515
"@nestjs/testing": "^4.0.1",
1616
"@nestjs/websockets": "^4.0.1",
17-
"body-parser": "^1.17.2",
1817
"mysql": "^2.14.1",
1918
"redis": "^2.7.1",
2019
"reflect-metadata": "^0.1.10",
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import * as bodyParser from 'body-parser';
21
import { NestFactory } from '@nestjs/core';
32
import { ApplicationModule } from './modules/app.module';
43

54
async function bootstrap() {
65
const app = await NestFactory.create(ApplicationModule);
7-
app.use(bodyParser.json());
86
await app.listen(3001);
97
}
108
bootstrap();

0 commit comments

Comments
 (0)