Creating the streaming server

In this section, we will use Node to create the streaming server. The server will handle the client connections and the connection to the Twitter-streaming API; it will also manage the list of topics for all the clients who deliver tweets as they arrive.

We will begin by creating Twitter authentication tokens; we will learn how to use the Twit module to manage the connection to the Twitter API, and how to use Socket.IO to handle real-time communication between the server and the client application.

To follow the examples in this section, open the chirp-server project directory in the terminal and run the following command to install the project dependencies:

$ npm install

This will create the node_modules directory ...

Get D3.js: Cutting-edge Data Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.