Skip to content

Instantly share code, notes, and snippets.

@dceddia
Last active October 10, 2017 23:07
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 dceddia/83502fbca1a9cff1563f1614591b9a78 to your computer and use it in GitHub Desktop.
Save dceddia/83502fbca1a9cff1563f1614591b9a78 to your computer and use it in GitHub Desktop.
var express = require('express');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
// Comment out this line:
//res.send('respond with a resource');
// And insert something like this instead:
res.json([{
id: 1,
username: "samsepi0l"
}, {
id: 2,
username: "D0loresH4ze"
}]);
});
module.exports = router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment