Created
March 15, 2019 17:58
-
-
Save tsraveling/7552fcdc8ba2fdd266be2d780738aea2 to your computer and use it in GitHub Desktop.
Catch all other URLs and 404s #express
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Other routes here | |
| app.get('*', function(req, res){ | |
| res.send('Sorry, this is an invalid URL.'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment