Meteor webapp vs Picker vs simple:rest for REST API


Are there any advantages or issues in choosing one of these methods for implementing a REST API endpoint over the others? I was using Picker but decided to switch to Meteor’s built-in meteor/webapp just to reduce dependencies.

Official Rest API support in Meteor?

In my opinion:

  1. with webapp, you must manually parse url, request body, params to get suitable results,
  2. with Picker, I dont have any experiences
    I suggest that you should you webapp + express:
import express from 'express';

const app = express();
WebApp.connectHandlers.use(Meteor.bindEnvironment(app));'/', function (req, res) {
  res.send('POST request to the homepage')

Not sure what your timeframe is, but I’ll be evaluating the same thing over the next week or two. Been using picker for ~2 years but I’m in the middle of some refactoring and this is on my list. If I keep it or switch, I’ll try to post my reasons here.


Using webapp with incoming JSON data is super easy and doesn’t require any special steps:

WebApp.connectHandlers.use('/api/whatever', function (req, res) {
  req.on('data', Meteor.bindEnvironment(chunk => {
    const data = JSON.parse(chunk);
    // ... do stuff here

Express, bindEnvironment, wrapAsync and validated methods
WebApp.connectHandlers.use and access to collections

Hi @vigorwebsolutions so did you kept or switched ?


We started using WebApp.connectHandlers.use exclusively.

It’s very similar to express, basically you can intercept the routes you want to handle server side, or just call next() to pass the request to the next handler (flowRouter in our case).

1 Like

Has any help how to use WebApp?

1 Like