Created
December 18, 2018 06:53
-
-
Save Freizello/3126025131af380d8860186437856230 to your computer and use it in GitHub Desktop.
[Route Example for ExpressJS - part 2] We've set up all our new routes, but we still have a route to the original page. Let's instead redirect this to the new index page that we've created at the path '/catalog'. #expressjs #nodejs
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
// GET home page. | |
router.get('/', function(req, res) { | |
res.redirect('/catalog'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment