Skip to content

Commit

Permalink
Add response compression.
Browse files Browse the repository at this point in the history
  • Loading branch information
crertel committed Dec 3, 2016
1 parent efa1208 commit 2b2755a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
44 changes: 44 additions & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dependencies": {
"bluebird": "^3.4.0",
"body-parser": "^1.15.2",
"compression": "^1.6.2",
"cookie-parser": "^1.4.3",
"ejs": "^2.4.2",
"express": "^4.13.3",
Expand Down
2 changes: 2 additions & 0 deletions server/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

var express = require('express');
var compression = require('compression');
var app = express();
var path = require('path');
var crypto = require('crypto');
Expand All @@ -23,6 +24,7 @@ db.init( kDatabaseConnection );
var kTwentyYears = 1000 * 60 * 60 * 24 * 365 * 20;

// Make sure we can get the cookies.
app.use( compression() );
app.use( cookieParser() );
app.use( bodyParser.json() );
app.use( function _addTaskSig( req, res, next ) {
Expand Down

0 comments on commit 2b2755a

Please sign in to comment.