Open
Description
It seems to me that for example middleware is a global assignment to Picker, and there is no action
parameter, but just a function as second argument to the route method.
Picker is great, and when migrating from Iron-Router to FlowRouter + Picker, it should really help if Picker felt a bit more like FlowRouter. For example:
var bodyParser = Meteor.npmRequire('body-parser');
var postRoutes = Picker.filter(function(req, res) {
return req.method == "POST";
});
Picker.route('/post/:id', {
middlewares: [bodyParser],
filters: [postRoutes],
action: function(params, req, res, next) {
// ...
}
});
Like I said, Picker is really great! So I'm not trying to be negative about it. Just trying to help make it feel more familiar.
Metadata
Metadata
Assignees
Labels
No labels