egg-compress-middleware
v1.0.1
Published
an egg compress middleware
Downloads
3
Readme
egg-compress-middleware
an eggjs middleware to set gzip or brotli encodings.
How to use
$ npm i egg-compress-middleware
Then create a file in middleware
directory to import the module.
// app/middleware/compress.js
const eggCompress = require('egg-compress-middleware')
module.exports = (options) => {
return eggCompress
}
Then enable the middleware in yout config files.