title: client-client communication using nodejs
body: <p>I would like to communicate 2 web pages page1.html and page2.html. I have thought that page1 is related to a app1.js node application and page2.html to a app2.js node application. The idea is to send data from the page1.html to app1.js using websockets and then the app1.js will send the data to the page2.html. My first idea is that app1.js sends data to app2.js and then app2.js to the page2.html. I know how to use web sockets to communicate (client-server)  the page1.html with the app1.js but how to send data from app1.js to app2.js? In the app1.js I have </p>
  
  <pre><code>io = require('socket.io').listen(3000); //and 
  
  io.sockets.on('connection', function (socket) {
      socket.on('GETDATAFROMPAGE1', function (data){
           .....I Get data to be sent to app2?
      });
  }
  </code></pre>
  
  <p>Do I need to create a new io2 for other port? How can I do to send data to the app2.html?
  I know how to do a client server communication but I don't know server-server communication and how to mix both 
  Summary: page1.html -> app1.js --> app2.js --> page2.html   using websockets
  Thanks for your answer</p>