vuejs / vue-hackernews-2.0

HackerNews clone built with Vue 2.0, vue-router & vuex, with server-side rendering
MIT License
10.96k stars 2.15k forks source link

Friendly 404 page? #343

Open ataylor32 opened 5 years ago

ataylor32 commented 5 years ago

Currently, 404 errors are handled like this:

res.status(404).send('404 | Page Not Found')

Since this is a demo app, it would be nice to see a demo of handling 404 errors properly. To me, that means keeping the "shell" of the Vue app (still reactive and everything) with a message like "The page you requested was not found. Please follow one of the links above."

EDIT: It should also still have the "404" status code.