W
W
Wasya UK2018-03-11 20:12:03
Node.js
Wasya UK, 2018-03-11 20:12:03

How to compress files for transfer to node?

I found the koa-compress module , connected it, but the result is not visible. What could be the problem?
The code:

app.use(compress({
  filter: function (content_type) {
  	return /text/i.test(content_type)
  },
  threshold: 2048,
  flush: require('zlib').Z_SYNC_FLUSH
}));

Website: https://evening-wildwood-72825.herokuapp.com

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question