Is there any documentation on webapp

Hi,
I’m starting to dig into the webapp connect handles, but I actually cannot find any documentation on it

http://docs.meteor.com/#/full/webapp

Things I am looking for:

  • how to expose get/post methods
  • how to specify some path parameters

Meteor uses connect behind the scene. If you looking to achieve what you are looking for use picker. It’s a server side router for Meteor.

You can define routes like this:

var postRoutes = Picker.filter(function(req, res) {
  // you can write any logic you want.
  // but this callback does not run inside a fiber
  // at the end, you must return either true or false
  return req.method == "POST";
});

postRoutes.route('/post/:id', function(params, req, res, next) {
  // ...
});

For more information check here: http://meteorpedia.com/read/REST_API

Thanks for the link, cfs:http-methods looks like a good match for me!

But still I am a bit curious if there is any good documentation on the connect middleware, I could get it to work with the body-parser and manage to receive a request, but it was a lot of trial and error

1 Like

I think it’s also maintained well.