Added caching

This commit is contained in:
Marcus Noble 2016-05-27 06:10:01 +01:00
parent 58bedb277d
commit c547212971

3
app.js
View File

@ -19,9 +19,10 @@ const emoji = require('markdown-it-emoji');
const moment = require('moment');
const port = process.env.PORT || 8000;
const oneDay = 86400000;
app.use(express.static(__dirname + '/build'));
app.use(compress());
app.use(express.static(__dirname + '/build', {maxAge: oneDay}));
var md = markdown('commonmark', {html: true});
md.parser.use(emoji);