Added compression

This commit is contained in:
Marcus Noble 2016-05-27 06:04:05 +01:00
parent a2e3afb01d
commit 58bedb277d
2 changed files with 8 additions and 0 deletions

7
app.js
View File

@ -2,6 +2,7 @@
const fs = require('fs');
const https = require('https');
const express = require('express');
const compress = require('compression');
const app = express();
const Metalsmith = require('metalsmith');
const inplace = require('metalsmith-in-place');
@ -20,6 +21,7 @@ const moment = require('moment');
const port = process.env.PORT || 8000;
app.use(express.static(__dirname + '/build'));
app.use(compress());
var md = markdown('commonmark', {html: true});
md.parser.use(emoji);
@ -51,6 +53,11 @@ Metalsmith(__dirname)
},
pages: {
pattern: 'pages/*'
},
experience: {
pattern: 'experience/*',
sortBy: 'start',
reverse: true
}
}))
.use(inplace({

View File

@ -5,6 +5,7 @@
"start": "node app.js"
},
"dependencies": {
"compression": "^1.6.2",
"express": "^4.13.4",
"handlebars": "^4.0.5",
"markdown-it-emoji": "^1.1.1",