Skip to content

Instantly share code, notes, and snippets.

@rdiego26
Created January 12, 2015 00:34
Show Gist options
  • Save rdiego26/cfbdc32ad754ef01d825 to your computer and use it in GitHub Desktop.
Save rdiego26/cfbdc32ad754ef01d825 to your computer and use it in GitHub Desktop.
Express with gzip example
var express = require('express'),
http = require('http'),
compression = require('compression');
/* App Configuration */
var app = express();
app.set('port', 1234);
app.set('title', 'Express with gzip example');
app.use(compression()); //Enable gzip, compress all requests
http.createServer(options, app).listen(app.get('port'), function () {
console.log(app.get('title') + ' listening on port ' + app.get('port'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment