CliffC
tRPC2y ago
2 replies
Cliff

integrating with Meteor

I have made a simple app with express before and now I am trying to get a proof of concept running with Meteor.js. Meteor has a webApp component that behaves much like an express handler. For example, I can do this:

WebApp.connectHandlers.use('/trpc',

    (req, res, next) => {
      // request logger
      console.log(':arrow_left: ', req.method, req.path, req.body ?? req.query);

      next();
    }
  );


I was able to create api routers the same as in all the sample docs, but without an actual meteor middleware, I am not sure what to put in the handler above to connect it all up. Any advice?
Was this page helpful?