Named routes in param pre-conditions
I'd like to use a Route Param Pre-Condition to fetch portfolio items by "slug" if the :slug parameter is set in the URL. I also, however, would like to use a RegExp to match the URI. Are named captures supported in node? Can I give that ([-\w]+) capture a name so the slug pre-condition gets fired? app.param('slug', function(req, res, next, slug){ // get thing from database by slug }) //app.get('/work/view/:slug', function(req, res){ app.get(/^\/work\/view\/([-\w]+)/, function(req, res){ // render view }) I'm not sure if this is what you are looking for, but as far as I know, there is no direct