Connect to a socket.io node.js server from a node.js console program

Let me explain the setup a bit more. I have socket.io running inside a node.js server.

I want to connect to this server from another node.js program that is running in the console (outside the browser).

All examples that I have seen so far only talk about a socket.io client that is running inside a browser, but I want to connect to a console program which is outside the browser.

Is it possible to do something like this?

No problem, use socket.io-client

more info here: https://github.com/LearnBoost/socket.io-client