gzip compression for tako
JavaScript
Switch branches/tags
Nothing to show
Latest commit e5943c3 Apr 29, 2012 @kesla bump version
Permalink
Failed to load latest commit information.
.gitignore initial commit Apr 29, 2012
README.md Update README.md with info on installation Apr 29, 2012
example.js First version Apr 29, 2012
gzip.js Set headers correctly Apr 29, 2012
package.json bump version Apr 29, 2012

README.md

tako-gzip

A simple gzip middleware for Tako.

Uses negotiator to only gzip when the http request Accept-Encoding include gzip.

Installation

  npm install tako tako-gzip

Usage

var gzip = require("tako-gzip");

// gzip responses when possible
app.on('request', gzip);

// response is now gzipped.
app.route('/').json({
  "hello": "gzip"
});