We are going to use WebSockets to connect with the server through the socket.io-client. On the server we modeled, connections and requests as observable objects and we will do the same on the client, To do so, open the connection.js file inside the client folder, and import the modules that we are going to use:
var Rx = require('rx'); var io = require('socket.io-client');
So far we have only imported the rx module, which we will use to create the observables, and the socket.io-client, which we will use to start the connection.
Now we need to connect to the server. As we are running ...