Created
January 12, 2015 00:34
-
-
Save rdiego26/cfbdc32ad754ef01d825 to your computer and use it in GitHub Desktop.
Express with gzip example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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