Created
August 26, 2017 21:36
-
-
Save natmegs/18e63953049cdbdfc0e346e5f390775d to your computer and use it in GitHub Desktop.
users routes in express router example
This file contains 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
var express = require('express'); | |
// Router middleware; | |
// put GETs/POSTs/etc on Router | |
var router = express.Router(); | |
// GET /users/ | |
router.get('/', function(req, res, next) { | |
res.send('respond with a resource'); | |
}); | |
module.exports = router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment