3 ms·
I believe you still have to use a third-party package (https://github.com/meteorhacks/npm https://github.com/meteorhacks/npm), but it's quite easy to use and I'
by rory 11y ago
I believe you still have to use a third-party package (https://github.com/meteorhacks/npm https://github.com/meteorhacks/npm), but it's quite easy to use and I've never had any problems with it.
- chrisquinnr 11y ago+1 If there's not a Meteor-specific package you're comfortable with then this is the option. Case in point, I prefer using stripe and twilio via meteorhacks:npm.
- morgante 11y agoI've tried using it before, but the requirement to wrap all async methods in synchronous helpers is pretty annoying. I just don't understand why Meteor decided to be incompatible with the vast majority of server-side JavaScript in the wild.
- kentonv 11y agoYou don't have to wrap your async methods if you don't want to. Meteor prefers to use fibers since a lot of people find them easier to work with, but if you write async code it will generally work fine. The one thing is that when you want to call back into Meteor code, you need to do it in a fiber, so you'll probably want to write a little helper for that. Here's my version: https://github.com/sandstorm-io/sandstorm/blob/master/shell/server/proxy.js#L59 https://github.com/sandstorm-io/sandstorm/blob/master/shell/...
- kentonv 11y agoYou don't have to use that. Meteor has had built-in support for npm since something like v0.6 (~two years ago). You need to declare your npm dependencies in your package.js but then you can go ahead and use `Npm.require`. As someone who has been building on Meteor for a while and using many npm modules, I've never actually heard of "meteorhacks:npm", and to be honest I'm confused what it's for...
- primigenus 11y agoIt allows you to skip having to specify npm dependencies in package.js.