0

This may seem like a very basic question. I need my small Meteor app to integrate with an external service. Specifically ZeroRPC - http://zerorpc.dotcloud.com/

Here's some example ZeroRPC client code.

Are there any potential issues with this and Is there a preferred way to do this?

var zerorpc = require("zerorpc");

var client = new zerorpc.Client();
client.connect("tcp://127.0.0.1:4242");

client.invoke("hello", "RPC", function(error, res, more) {
console.log(res);
});
user1513388
  • 7,165
  • 14
  • 69
  • 111

1 Answers1

1

You're looking for a way to use npm modules. There are a couple ways to do this:

The first one is preferable, but if you've forked it and changed some stuff, you might want to go with the second one.

You will quite likely run into async issues when using Meteor with other external services, so you might find this Meteor Async Guide helpful.

Community
  • 1
  • 1
BenjaminRH
  • 11,974
  • 7
  • 49
  • 76