Book Image

Data Visualization with D3 and AngularJS

By : Erik Hanchett, Christoph Körner
Book Image

Data Visualization with D3 and AngularJS

By: Erik Hanchett, Christoph Körner

Overview of this book

Table of Contents (16 chapters)
Data Visualization with D3 and AngularJS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building a real-time monitoring server


In this section, we implement the server application. This application should be able to monitor files and communicate with multiple clients at the same time. These are the perfect requirements to use an event-driven, nonblocking I/O application platform such as Node.js. The fact that we can also code the server application in JavaScript is another huge advantage. Additionally, the built-in package manager npm provides a variety of useful and easy to use packages.

Setting up a Node.js application

First, we need to install Node.js on our development machine. We can download and install the latest binaries from http://nodejs.org/. Node.js automatically installs its npm package manager, which we will use to install all the required packages for the server application.

To create a Node.js application, we will first create a package.json file, a file that contains all metainformation about the application (such as name, version number, and dependencies):

{
...