jcoreio / crater

Meteor/Webpack/React SSR app skeleton that runs your app code outside of Meteor Isobuild
ISC License
82 stars 10 forks source link

Use WebApp.rawConnectHandlers instead of reverse proxy #8

Closed jedwards1211 closed 8 years ago

jedwards1211 commented 8 years ago

Reverse proxying is a waste of computation, I wasn't aware of rawConnectHandlers until now

  // Packages and apps can add handlers that run before any other Meteor                                             //
  // handlers via WebApp.rawConnectHandlers.                                                                         //
  var rawConnectHandlers = connect();                                                                                // 596
  app.use(rawConnectHandlers);  
jedwards1211 commented 8 years ago

Closed by #9; unfortunately I wasn't able to get webpack-hot-middleware working within WebApp.rawConnectHandlers, so in dev mode it still uses an Express server with reverse proxy to Meteor. But in prod all of the custom server middleware runs within rawConnectHandlers.