Skip to content

Commit

Permalink
Enable HTTP compression
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperzuk-neti committed Oct 4, 2024
1 parent b2cd993 commit 00b2ecf
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
63 changes: 63 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@nestjs/schedule": "^4.1.0",
"@prisma/client": "^5.19.1",
"axios": "^1.7.7",
"compression": "^1.7.4",
"lodash": "^4.17.21",
"luxon": "^3.5.0",
"reflect-metadata": "^0.2.2",
Expand Down
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import * as compression from 'compression';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors();
app.use(compression)
await app.listen(3000);
}
bootstrap();

0 comments on commit 00b2ecf

Please sign in to comment.