Skip to content

Commit

Permalink
Test shrink-ray-current
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Nov 30, 2019
1 parent 9d9e3e7 commit 369d82f
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 23 deletions.
6 changes: 2 additions & 4 deletions app.js
Expand Up @@ -18,12 +18,11 @@ const customMime = mime.define({
const STATIC_OPTS = {
maxAge: '1y',
lastModified: true,
etag: false,
mime: customMime
};

// middleware
const compression = require('compression');
const shrinkRay = require('shrink-ray-current');
const favicon = require('serve-favicon');
const logger = require('morgan');
const errorHandler = require('errorhandler');
Expand All @@ -45,7 +44,6 @@ const app = express();
// all environments
app.set('views', path.join(__dirname, '/views/'));
app.set('view engine', 'pug');
app.set('etag', false);
app.set('json escape', true);
app.set('json spaces', 2);
app.set('x-powered-by', false);
Expand Down Expand Up @@ -95,7 +93,7 @@ if (NODE_ENV === 'production') {
}

// middleware
app.use(compression());
app.use(shrinkRay());
app.use(staticify.middleware);

app.use(favicon(path.join(PUBLIC_DIR, config.app.favicon.uri), '7d'));
Expand Down
191 changes: 173 additions & 18 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -35,7 +35,6 @@
"wp-plugin": "node ./scripts/wp-plugin.js"
},
"dependencies": {
"compression": "^1.7.4",
"cross-env": "^6.0.3",
"errorhandler": "^1.5.1",
"express": "^4.17.1",
Expand All @@ -50,6 +49,7 @@
"rollbar": "^2.14.4",
"semver": "^6.3.0",
"serve-favicon": "^2.5.0",
"shrink-ray-current": "^4.1.2",
"sri-toolbox": "^0.2.0",
"staticify": "^3.3.4",
"uuid": "^3.3.3"
Expand Down

0 comments on commit 369d82f

Please sign in to comment.