Add Param middleware to fix dynamic routing in express

app.param('name', function (request, response, next) {

  request.cityName = parseCityName(request.params.name);

  next();

});

No comments:

Post a Comment