Skip to content

Commit

Permalink
Fix:Comment resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
DevendraPPatil committed Nov 12, 2024
1 parent 649fc47 commit 1b1ad69
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
import { NestFactory } from '@nestjs/core';
import {
FastifyAdapter,
NestFastifyApplication
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { AppClusterService } from './app-cluster.service';
import compression from '@fastify/compress';


async function bootstrap() {
const app = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter(),
);

await app.register(compression, {
await app.register(compression,{
global: true,
zlibOptions: {
level: 6,
},
threshold: 512,
encodings: ['gzip', 'deflate'],
encodings: ['gzip', 'deflate']
});

app.useGlobalPipes(new ValidationPipe());
Expand All @@ -47,5 +46,4 @@ async function bootstrap() {

await app.listen(3008, '0.0.0.0');
}

AppClusterService.clusterize(bootstrap);
AppClusterService.clusterize(bootstrap);

0 comments on commit 1b1ad69

Please sign in to comment.