Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
[FEATURE] Use gzip compression
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Cohen committed Jan 8, 2015
1 parent ea2a731 commit 8dc2365
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib/express_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const remote = require('./remote.js');
const router = require('./router.js');
const errors = require('./errors.js');
const utils = require('./utils.js');
const compress = require('compression');

var app = express();

Expand All @@ -19,6 +20,7 @@ app.disable('x-powered-by');
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());

app.use(compress());
app.use(function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type');
Expand Down
83 changes: 77 additions & 6 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 @@
"bignumber.js": "~1.4.0",
"bluebird": "^2.3.4",
"body-parser": "^1.7.0",
"compression": "^1.3.0",
"express": "^4.8.7",
"jayschema": "*",
"knex": "0.7.3",
Expand Down

0 comments on commit 8dc2365

Please sign in to comment.