@nicksrandall/compression
v1.0.3
Published
Compression middleware
Downloads
4
Readme
@nicksrandall/compression
HTTP Compression library for Node.js (v10+)
Supports Brotli, Gzip, and Deflate
Example
const http = require('http');
const Compression = require('@nicksrandall/compression');
const compression = Compression({ /* optional zlib settings */ });
const server = http.createServer(compression((req, res) => {
// your request listener
}));
server.listen(3000);