Skip to content

Instantly share code, notes, and snippets.

View emilniklas's full-sized avatar

Emil Broman emilniklas

View GitHub Profile
@jankuca
jankuca / example.js
Created November 12, 2011 16:40
gzip for native node.js http.Server
var http = require('http');
var gzip = require('http-gzip');
var server = http.createServer(function (req, res) {
gzip(req, res);
res.writeHead(200, {
'content-type': 'text/plain'
});
res.write('I am gonna be gzip encoded, dude!');