Chapter 1. Welcome to Node.js

 

This chapter covers

  • What Node.js is
  • JavaScript on the server
  • The asynchronous and evented nature of Node
  • Types of applications Node is designed for
  • Sample Node programs

So what is Node.js? It’s likely you’ve heard the term. Maybe you already use Node. Maybe you’re curious about it. At this point in time, Node is very popular and young (it debuted in 2009). It’s the second-most-watched project on GitHub (https://github.com/joyent/node), it has quite a following in its Google group (http://groups.google.com/group/nodejs) and IRC channel (http://webchat.freenode.net/?channels=node.js), and it has more than 15,000 community modules published in NPM, the package manager (http://npmjs.org). All this to say, there’s considerable traction behind this platform.

Ryan Dahl on Node

You can watch the first presentation on Node by creator Ryan Dahl on the JSCONF Berlin 2009 website: http://jsconf.eu/2009/video_nodejs_by_ryan_dahl.html.

The official website (http://www.nodejs.org) defines Node as “a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.”

In this chapter, we’ll look at these concepts:

1.1. Built on JavaScript

1.2. Asynchronous and evented: the browser

1.3. Asynchronous and evented: the server

1.4. DIRTy applications

1.5. DIRTy by default

1.6. Summary

sitemap