Merge pull request #11 from nkoder/redirect-app-server-side-to-landing-page

Show landing page instead of 404 on editor page reload
This commit is contained in:
Nicola 2021-04-28 23:36:11 +02:00 committed by GitHub
commit 9c43fae68a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)));