I have Nodejs Project with ES6 Babel. I want to compress my API response using compression but it is not working as it response with same amount of response with and without compression.
app.js
import express from 'express';
import routes from './route/index';
import compression from 'compression';
let app = express();
app.use(compression());
app.use(routes);
I don't know what is wrong with this. I tried all the flags in compression as *level, threshold and filter but not succeed.