Skip to content

Instantly share code, notes, and snippets.

@omonk
Created January 14, 2017 18:21
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 omonk/63343f1c8f97e7bae3dc692bdeedbf03 to your computer and use it in GitHub Desktop.
Save omonk/63343f1c8f97e7bae3dc692bdeedbf03 to your computer and use it in GitHub Desktop.
// app.js
var dimensions = require('./routes/dimensions');
app.use('/:width/:height', dimensions);
// .routes/dimensions.js
var express = require('express');
var router = express.Router();
router.get('/:width/:height', function(req, res, next) {
res.send(req.params);
});
module.exports = router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment