I'm afraid the issue is in the server script.
You need to create a socket for each app, and maintain some ID to those applications.
As it is, your server is just reacting to the very first application connecting to it. And that's about it. It's not programmed so it would relay any kind of received message.
Moreover, I'm afraid the programming of a server-side script is out of the scope of those forums. You'd need to check out around node.js community to get help on how to properly make your server script.