In Node.js, how do I make one server call a function on another server?

TIMEX picture TIMEX · May 12, 2011 · Viewed 7k times · Source

Let's say I have 2 web servers. Both of them just installed Node.js and is running a website (using Express). Pretty basic stuff.

How can Server-A tell Server-B to execute a function? (inside node.js)

Preferably...is there a npm module for this that makes it really easy for me?

Answer

yojimbo87 picture yojimbo87 · May 12, 2011

How can Server-A tell Server-B to execute a function?

You can use one of the RPC modules, for example dnode.