Skip to content

Instantly share code, notes, and snippets.

@patrickdawson
Last active November 28, 2016 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickdawson/49d3b42eed3f5c35bbdddad3995b3815 to your computer and use it in GitHub Desktop.
Save patrickdawson/49d3b42eed3f5c35bbdddad3995b3815 to your computer and use it in GitHub Desktop.
Express-Angular: Catch 404
// 404 catch
app.all('*', (req, res) => {
console.log(`[TRACE] Server 404 request: ${req.originalUrl}`);
res.status(200).sendFile(`${path.join(__dirname, 'public')}/index.html`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment