Feedback needed: simple:rest compat

Resurrecting this thread, because I suspect there will be users hitting a few road bumps with simple:json-routes and likely landing here for info.

We have managed to successfully upgrade to Meteor 3.0-beta.0. Among the many dependencies, we have simple:json-routes underpinning a REST API for managing user accounts.

We completely replaced connect with express in the locally forked package, so far with just one downside. With the connect router, the req.route property passed downstream was a string, representing the path. With the express router, req.route is an object, so to get the path you’d need to use req.route.path.

If anyone is interested, reply here and I can describe how to migrate a locally forked simple:json-routes, before a community supported version becomes available.

@filipenevola, I am happy to send a pull request to migrate this package and simple:rest-json-error-handler. We just need to discuss how to solve the req.route vs. req.route.path conundrum. Should we maintain compatibility, to minimise disruption as per the discussion in What impact does Webapp transition from connect to express have on community packages that use it?, or should we just accept that there will be a necessary disruption and just update the REAMDE with whatever breaking changes are identified?

4 Likes