From ac32f42318a014c737f77d10fb9ae75a8b51ef85 Mon Sep 17 00:00:00 2001 From: nkoder Date: Wed, 28 Apr 2021 23:33:53 +0200 Subject: [PATCH] Show landing page instead of 404 on editor page reload --- server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.js b/server.js index 596cf60..aec95c0 100644 --- a/server.js +++ b/server.js @@ -23,6 +23,11 @@ app.get('/', (req, res) => { }); }); +// Better to show landing page rather than 404 on editor page reload +app.get('/pixel-editor/app', (req, res) => { + res.redirect('/'); +}) + //ROUTE - other files app.use(express.static(path.join(__dirname, BUILDDIR)));