Skip to content

Instantly share code, notes, and snippets.

@srs
Created October 19, 2016 14:13
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 srs/3d2b968f5352c28ba2cdc50a242f83b8 to your computer and use it in GitHub Desktop.
Save srs/3d2b968f5352c28ba2cdc50a242f83b8 to your computer and use it in GitHub Desktop.
PurpleJS Blog - Snippet 12
router.get('/random/{max}', function(req) {
return {
body: getRandom(req.pathParams.max)
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment