Skip to content

Commit

Permalink
Remove body-parser from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Nov 2, 2017
1 parent c7ff78f commit c86d5a4
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion examples/01-cats-app/package.json
Expand Up @@ -19,7 +19,6 @@
"@nestjs/microservices": "^4.0.1",
"@nestjs/testing": "^4.0.1",
"@nestjs/websockets": "^4.0.1",
"body-parser": "^1.17.2",
"class-transformer": "^0.1.7",
"class-validator": "^0.7.2",
"redis": "^2.7.1",
Expand Down
4 changes: 0 additions & 4 deletions examples/01-cats-app/src/server.ts
@@ -1,14 +1,10 @@
import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';
import { ValidationPipe } from './modules/common/pipes/validation.pipe';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);

app.use(bodyParser.json());
app.useGlobalPipes(new ValidationPipe());

await app.listen(3000);
}
bootstrap();
1 change: 0 additions & 1 deletion examples/02-gateways/package.json
Expand Up @@ -14,7 +14,6 @@
"@nestjs/microservices": "^4.0.1",
"@nestjs/testing": "^4.0.1",
"@nestjs/websockets": "^4.0.1",
"body-parser": "^1.17.2",
"class-transformer": "^0.1.7",
"class-validator": "^0.7.2",
"redis": "^2.7.1",
Expand Down
2 changes: 0 additions & 2 deletions examples/02-gateways/src/server.ts
@@ -1,10 +1,8 @@
import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
app.use(bodyParser.json());
await app.listen(3000);
}
bootstrap();
1 change: 0 additions & 1 deletion examples/03-microservices/package.json
Expand Up @@ -15,7 +15,6 @@
"@nestjs/testing": "^4.0.1",
"@nestjs/websockets": "^4.0.1",
"amqplib": "^0.5.1",
"body-parser": "^1.17.2",
"class-transformer": "^0.1.7",
"class-validator": "^0.7.2",
"redis": "^2.7.1",
Expand Down
2 changes: 0 additions & 2 deletions examples/03-microservices/src/server.ts
@@ -1,4 +1,3 @@
import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';
import { Transport } from '@nestjs/microservices';
Expand All @@ -9,7 +8,6 @@ async function bootstrap() {
transport: Transport.TCP,
});

app.use(bodyParser.json());
await app.startAllMicroservicesAsync();
await app.listen(3001);
}
Expand Down
1 change: 0 additions & 1 deletion examples/04-injector/package.json
Expand Up @@ -14,7 +14,6 @@
"@nestjs/microservices": "^4.0.1",
"@nestjs/testing": "^4.0.1",
"@nestjs/websockets": "^4.0.1",
"body-parser": "^1.17.2",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
"rxjs": "^5.4.3",
Expand Down
2 changes: 0 additions & 2 deletions examples/04-injector/src/server.ts
@@ -1,10 +1,8 @@
import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
app.use(bodyParser.json());
await app.listen(3001);
}
bootstrap();
1 change: 0 additions & 1 deletion examples/05-sql-typeorm/package.json
Expand Up @@ -14,7 +14,6 @@
"@nestjs/microservices": "^4.0.1",
"@nestjs/testing": "^4.0.1",
"@nestjs/websockets": "^4.0.1",
"body-parser": "^1.17.2",
"mysql": "^2.14.1",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
Expand Down
2 changes: 0 additions & 2 deletions examples/05-sql-typeorm/src/server.ts
@@ -1,10 +1,8 @@
import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
app.use(bodyParser.json());
await app.listen(3001);
}
bootstrap();
1 change: 0 additions & 1 deletion examples/06-mongoose/package.json
Expand Up @@ -14,7 +14,6 @@
"@nestjs/microservices": "^4.0.1",
"@nestjs/testing": "^4.0.1",
"@nestjs/websockets": "^4.0.1",
"body-parser": "^1.17.2",
"mongoose": "^4.11.13",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
Expand Down
2 changes: 0 additions & 2 deletions examples/06-mongoose/src/server.ts
@@ -1,10 +1,8 @@
import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
app.use(bodyParser.json());
await app.listen(3001);
}
bootstrap();
1 change: 0 additions & 1 deletion examples/07-sequelize/package.json
Expand Up @@ -14,7 +14,6 @@
"@nestjs/microservices": "^4.0.1",
"@nestjs/testing": "^4.0.1",
"@nestjs/websockets": "^4.0.1",
"body-parser": "^1.17.2",
"mysql2": "^1.4.2",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
Expand Down
2 changes: 0 additions & 2 deletions examples/07-sequelize/src/server.ts
@@ -1,10 +1,8 @@
import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
app.use(bodyParser.json());
await app.listen(3001);
}
bootstrap();
1 change: 0 additions & 1 deletion examples/08-passport/package.json
Expand Up @@ -15,7 +15,6 @@
"@nestjs/testing": "^4.0.1",
"@nestjs/websockets": "^4.0.1",
"@types/passport-jwt": "^2.0.24",
"body-parser": "^1.17.2",
"jsonwebtoken": "^8.0.1",
"passport": "^0.4.0",
"passport-jwt": "^3.0.0",
Expand Down
2 changes: 0 additions & 2 deletions examples/08-passport/src/server.ts
@@ -1,10 +1,8 @@
import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
app.use(bodyParser.json());
await app.listen(3001);
}
bootstrap();
1 change: 0 additions & 1 deletion examples/09-babel-example/src/server.js
@@ -1,7 +1,6 @@
require('babel-core/register');
require('babel-polyfill');

import * as bodyParser from 'body-parser';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module';

Expand Down

0 comments on commit c86d5a4

Please sign in to comment.