{"repo":"tkoenig89/express-static-gzip","free":true,"listed":false,"github":"https://github.com/tkoenig89/express-static-gzip","clone":"git clone https://github.com/tkoenig89/express-static-gzip.git","description":"Simple wrapper on top of serveStatic, that allows serving pre-gzipped files as well as other types of compressions.","language":"JavaScript","stars":150,"topics":["compressions","brotli","express","gzip"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"express-static-gzip [![npm][npm-version-image]][npm-url] [![npm][npm-downloads-image]][npm-url] [![Donate][donate-paypal-image]][donate-url] Provides a small layer on top of serve-static , which allows to serve pre-gzipped files. Supports brotli and allows configuring any other compression you can think of as well. If express-static-gzip saved you some time, feel free to buy me a cup of coffee :) [![Donate][donate-paypal-image]][donate-url] Requirements For the express-static-gzip middleware to work properly you need to first ensure that you have all files gzipped (or compressed with your desired algorithm) which you want to serve as a compressed version to the browser. Simplest use case is to either have a folder with only .gz files, or you have a folder with the .gz files next to the original files. Same goes for other compressions. Install v3.0 This version updates express (v5) and serve-static (v2) dependencies to new major versions. v2.0 Even so this is a mayor release, this should be fully backwards compatible and should not have any breaking change to v1.1.3. Moved all options for serveStatic in its own section ( serveStatic ) to prevent collisions when setting up your static fileserving middleware. For backwards compatibility all root options that apply to serveStatic will be copied to the new serveStatic section, except if you have set values there already (no overwrite). Here is a small example of this behaviour: In the above scenario serveStatic will use cacheContr","default_branch":null,"files":null,"tree":[],"storefront":"/r/tkoenig89","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tkoenig89/express-static-gzip/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}