Go get a request from one node.js server to another

I currently have two instances of nodejs servers running on the local host, with instance 1 on port 15000 and instance 2 on port 16000. The first will work as a master with the second as part of a group of subordinates, where any request coming to the first is redirected to the second.

I'm having trouble sending messages from the first to the second.

var jquery = require('jquery');  
jquery.get('http://localhost:16000');

called from the first, does not receive the second (jquery loads correctly). I am going to try Mootools, but I would like you to advise in the best way to redirect the incoming nodejs request directly to another instance of the nodejs server.

+3
source share
1 answer

cluster.

cluster http.Server net.Server, .

- , http.request, HTTP- node.js.

jQuery MooTools ( C-, node.js!). . , , jQuery/MooTools node - jsdom

+5

All Articles