compress.min.js
v10.0.0-1
Published
Compress
Downloads
3
Readme
compress.min.js
const compress = require ("compress.min.js")
const http = require ("http")
var app = http.createServer (function (request, response) {
this.server = {request: request, response: response}
response.setHeader ("Content-Type", "text/html; charset=UTF-8")
response.setHeader ("Content-Encoding", "gzip")
var data = Buffer.from ("Hello Compress")
if (compress.pipe.call (this, data) === false) response.end ("Hello World")
})
app.listen (3000)