Show landing page instead of 404 on editor page reload

This commit is contained in:
nkoder 2021-04-28 23:33:53 +02:00
parent 855c125f8a
commit ac32f42318

View File

@ -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 //ROUTE - other files
app.use(express.static(path.join(__dirname, BUILDDIR))); app.use(express.static(path.join(__dirname, BUILDDIR)));