@robertklep was close - you should just add a name
to the route.
The express "route chain" syntax isn't supported, but the same functionality can be accomplished like this:
server.get('/foo', function (req, res, next) {
if (something()) {
next('GetBar');
return;
}
res.send(200);
next();
});
server.get({
path: '/bar',
name: 'GetBar'
}, function (req, res, next) {
res.send(200, {bar: 'baz'));
next();
});