I am trying to set up a small system having one server (aka sensor) transfer data files to another server (aka server) (both running node.js apps) when it sees that the othe
What you are using is just the server socket.io which can only accept incoming connections. To connect to another server you need socket.io-client package. This will give you the connect function like one you usually use in the browser, now you can use it from node.js itself.