Skip to content

Commit

Permalink
[Task] #43, introduce gzip to transfer data
Browse files Browse the repository at this point in the history
  • Loading branch information
Type-Style committed Feb 7, 2024
1 parent ab25a75 commit 5c61c66
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
60 changes: 60 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@jest/globals": "^29.7.0",
"@tsconfig/node20": "^20.1.2",
"@types/bcrypt": "^5.0.2",
"@types/compression": "^1.7.5",
"@types/dotenv": "^8.2.0",
"@types/express": "^4.17.21",
"@types/hpp": "^0.2.5",
Expand All @@ -37,6 +38,7 @@
},
"dependencies": {
"chalk": "^4.1.2",
"compression": "^1.7.4",
"express": "^4.18.2",
"express-validator": "^7.0.1",
"helmet": "^7.1.0",
Expand Down
3 changes: 2 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require('module-alias/register');
import { config } from 'dotenv';
import express from 'express';
import compression from 'compression';
import helmet from 'helmet';
import hpp from 'hpp';
import getRawBody from 'raw-body';
Expand All @@ -24,7 +25,7 @@ app.use(
}
})
);

app.use(compression())
app.use(hpp());
app.use(cache);

Expand Down

0 comments on commit 5c61c66

Please sign in to comment.