UNPKG

lws-compress

Version:

Response compression middleware for lws

22 lines (15 loc) 1.28 kB
[![view on npm](https://badgen.net/npm/v/lws-compress)](https://www.npmjs.org/package/lws-compress) [![npm module downloads](https://badgen.net/npm/dt/lws-compress)](https://www.npmjs.org/package/lws-compress) [![Gihub repo dependents](https://badgen.net/github/dependents-repo/lwsjs/compress)](https://github.com/lwsjs/compress/network/dependents?dependent_type=REPOSITORY) [![Gihub package dependents](https://badgen.net/github/dependents-pkg/lwsjs/compress)](https://github.com/lwsjs/compress/network/dependents?dependent_type=PACKAGE) [![Node.js CI](https://github.com/lwsjs/compress/actions/workflows/node.js.yml/badge.svg)](https://github.com/lwsjs/compress/actions/workflows/node.js.yml) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard) # lws-compress Response compression middleware for lws. For usage instructions, see [here](https://github.com/lwsjs/local-web-server/wiki/How-to-use-response-compression). Adds the following options to lws. ``` --compress, -z Serve gzip-compressed resources, where applicable. --compress.threshold number Minimum response size in bytes to apply compression. Defaults to 1024. ``` * * * &copy; 2016-21 Lloyd Brookes \<75pound@gmail.com\>.