From 7121f71700def7d60c9bf22135b319d3f79bbf89 Mon Sep 17 00:00:00 2001 From: Marco Crapts Date: Mon, 1 Jul 2019 21:38:18 +0200 Subject: [PATCH] enable html history mode --- server/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/index.js b/server/index.js index 77d452e..044502f 100644 --- a/server/index.js +++ b/server/index.js @@ -57,8 +57,12 @@ function objectIdFromDate(date) { function dateFromObjectId(objectId) { return Math.floor(mongo.ObjectId(objectId).getTimestamp().getTime() / 1000) -}; +} app.use(express.static(path.join(__dirname, '../dist'))) +app.get('/*', function(req, res) { + res.sendFile(path.join(__dirname, '../dist/index.html')) +}) + module.exports = app