meteorjs WebApp.connectHandlers: how to match request params

974 views Asked by At

i want to use express like request params. but WebApp.connectHandlers do not match parameters like /user/:name. should i use a middleware or something?

1

There are 1 answers

3
Seth Malaki On

Have you ever tried Iron Router?

Here's an excerpt from their API:

Router.route('/items/:_id', function () {
  var item = Items.findOne({_id: this.params._id});
  this.render('ShowItem', {data: item});
});