Skip to content

Commit 255f7ad

Browse files
fixing packages for deployment
1 parent 8beaec1 commit 255f7ad

File tree

3 files changed

+424
-111
lines changed

3 files changed

+424
-111
lines changed

apps/api/package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,19 @@
2626
},
2727
"dependencies": {
2828
"@nestjs/cache-manager": "^2.2.2",
29-
"@nestjs/common": "^10.0.0",
29+
"@nestjs/common": "^11.0.1",
3030
"@nestjs/config": "^3.3.0",
31-
"@nestjs/core": "^10.0.0",
31+
"@nestjs/core": "^11.0.1",
3232
"@nestjs/jwt": "^10.2.0",
3333
"@nestjs/passport": "^10.0.3",
34-
"@nestjs/platform-express": "^10.3.10",
35-
"@nestjs/platform-socket.io": "^10.4.6",
34+
"@nestjs/platform-express": "^11.0.1",
35+
"@nestjs/platform-socket.io": "^11.0.1",
3636
"@nestjs/serve-static": "^4.0.2",
37-
"@nestjs/swagger": "^11.1.0",
37+
"@nestjs/swagger": "^11.1.5",
3838
"@nestjs/throttler": "^6.2.1",
3939
"@nestjs/typeorm": "^10.0.2",
40-
"@nestjs/websockets": "^10.4.6",
40+
"@nestjs/websockets": "^11.0.1",
4141
"@sendgrid/mail": "^8.1.3",
42-
"@types/compression": "^1.7.5",
4342
"bcrypt": "^5.1.1",
4443
"body-parser": "^1.20.3",
4544
"cache-manager": "^5.7.6",
@@ -69,10 +68,12 @@
6968
"@nestjs/schematics": "^10.0.0",
7069
"@nestjs/testing": "^10.0.0",
7170
"@types/bcrypt": "^5.0.2",
71+
"@types/compression": "^1.7.5",
7272
"@types/express": "^4.17.17",
7373
"@types/jest": "^29.5.2",
7474
"@types/multer": "^1.4.11",
7575
"@types/node": "^20.16.11",
76+
"@types/node-cache": "^4.2.5",
7677
"@types/passport-jwt": "^3.0.7",
7778
"@types/supertest": "^6.0.0",
7879
"@typescript-eslint/eslint-plugin": "^7.0.0",

apps/api/src/main.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,17 @@ async function bootstrap() {
1616

1717
// Add cache-control headers for static assets
1818
app.use((req: Request, res: Response, next: NextFunction) => {
19-
const staticExtensions = ['.js', '.css', '.png', '.jpg', '.jpeg', '.gif', '.ico', '.svg'];
20-
if (staticExtensions.some(ext => req.path.endsWith(ext))) {
19+
const staticExtensions = [
20+
'.js',
21+
'.css',
22+
'.png',
23+
'.jpg',
24+
'.jpeg',
25+
'.gif',
26+
'.ico',
27+
'.svg',
28+
];
29+
if (staticExtensions.some((ext) => req.path.endsWith(ext))) {
2130
res.set('Cache-Control', 'public, max-age=31536000'); // 1 year
2231
}
2332
next();

0 commit comments

Comments
 (0)