From c547212971adbf9e83971c54cda3b237d89776fb Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Fri, 27 May 2016 06:10:01 +0100 Subject: [PATCH] Added caching --- app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 2da5d2f..cefa4d6 100644 --- a/app.js +++ b/app.js @@ -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);