Skip to content

Commit

Permalink
Compress responses
Browse files Browse the repository at this point in the history
  • Loading branch information
64json committed Jan 24, 2019
1 parent 83213cd commit 5fb1217
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const express = require('express');
const compression = require('compression');
const app = express();

const frontend = require('./frontend');
Expand All @@ -10,6 +11,7 @@ const {
credentials,
} = require('../environment');

app.use(compression());
app.use((req, res, next) => {
if (req.hostname === 'algo-visualizer.jasonpark.me') {
res.redirect(301, 'https://algorithm-visualizer.org/');
Expand Down
39 changes: 39 additions & 0 deletions package-lock.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 @@ -31,6 +31,7 @@
"axios": "latest",
"bluebird": "latest",
"body-parser": "^1.18.2",
"compression": "^1.7.3",
"cookie-parser": "^1.4.3",
"express": "^4.15.4",
"express-github-webhook": "^1.0.6",
Expand Down

0 comments on commit 5fb1217

Please sign in to comment.