Created
December 17, 2020 14:27
-
-
Save HasanGokce/ac74bc3b7ea870fb6345bd00b5aaa7f1 to your computer and use it in GitHub Desktop.
Refactoring: Route Parameters "before"
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
| const express = require('express'); | |
| const router = express.Router(); | |
| router.get('/alice', (req, res) => { | |
| res.send('<h1 id="welcome-message">Welcome alice!</h1>'); | |
| }); | |
| router.get('/bob', (req, res) => { | |
| res.send('<h1 id="welcome-message">Welcome bob!</h1>'); | |
| }); | |
| module.exports = router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment