Can I use other node.js libraries in Meteor?

Tags: meteor

I was playing around with an idea and wanted to get some json from another site. I found with node.js people seem to use http.get to accomplish this however I discovered it wasn't that easy in Meteor. Is there another way to do this or a way to access http so I can call get? I wanted an interval that could collect data from an external source to augment the data the clients would interact with.


You can use Meteor.http if you want to handle http. To add other node.js libraries you can use meteorhacks:npm

meteor add meteorhacks:npm

Create apacakges.json file and add all the required packages name and versions.

  "redis": "0.8.2",
  "github": "0.1.8"

This video can help you solving your question :)
By: admin