NestJS · Middle · Question 62 of 75
How do you compress responses in Nest?
- ✓Correct answer: Use the
compressionmiddleware (Express) or@fastify/compress, or let the reverse proxy do it - 2Nest compresses everything automatically
- 3Use
ClassSerializerInterceptor
Explanation
In high-traffic setups, compression at a proxy or CDN saves Node.js CPU.