Added compression
This commit is contained in:
parent
a2e3afb01d
commit
58bedb277d
7
app.js
7
app.js
@ -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({
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user