Skip to content
Material for the "Understanding the Node.js Platform" class at General Assembly
JavaScript CSS
Latest commit 983f3ba Aug 5, 2013 @geekf geekf Corrected Chaijs link
It had the mocha link which has been updated to correct chai link
Failed to load latest commit information.
1-http Basic touchups from dry-run. Aug 13, 2012
2-realtime Update kitten game and make it jitsu-deployable. Aug 13, 2012
.gitignore Time to get this stuff in source control. Aug 13, 2012 Corrected Chaijs link Aug 5, 2013
presentation.pdf PDF version of slides Aug 13, 2012
presentation.pptx Minor presentation tweaks. Aug 13, 2012

Course Description

Node.js is an exciting new platform for building web applications in JavaScript. With its unique I/O model, it excels at the sort of scalable and real-time situations we are increasingly demanding of our servers. And the ability to use JavaScript for both the client and server opens up many possibilities for code sharing, expertise reuse, and rapid development.

This class is intended for those with some basic knowledge of JavaScript, interested in an introduction to the Node.js ecosystem and development platform. We'll discuss how to get started with Node, and why you would want to. We'll then explore Node's module and package system, demononstrating several of the more popular and impressive packages that exemplify the type of tasks Node excels at. These include low-level HTTP streaming with the http module, high-level bidirectional websocket communication with, and server-browser code sharing with browserify, jsdom, and node-canvas.

Event page


Most of these were mentioned during the class or in the discussion afterward.

  • Node.js website: go here to download and install Node
  • Nodejitsu: a great service for very easily deploying your Node code to the cloud.
    • Kitten Game: the kitten game (with websockets) has been deployed to Nodejitsu. It also has homework!
  • Node.js tag wiki on StackOverflow: has a lot of good links for further reading, including to several full-length books (some free).
  • NYC Node.js meetup
  • Packages used in the demos:
    • request (GitHub): a highly-capable helper for making HTTP requests, including easy piping, buffering, and callbacks.
    • ecstatic (GitHub): a simple static file server you can plug into the basic Node HTTP server, as in the demos, or into higher-level frameworks like express or flatiron.
    • github-firehose (GitHub): a small little package transforming the GitHub events API into a EventEmitter. The source code is good reading!
    • (npm, GitHub): a very high-level web sockets abstraction for bidirectional communication among multiple clients and your server.
    • browserify (GitHub): performs “compilation” of Node-style modules and packages into browser-ready bundles.
    • jsdom (GitHub): a virtual DOM on the server-side.
    • canvas: an implementation of the HTML5 canvas API on the server.
  • Packages discussed or otherwise recommended:
    • express (npm, GitHub): the most popular higher-level framework for writing websites. Gives you thinks like views and routing, as well as the basics like caching or redirection.
    • restify (npm, GitHub): a higher-level framework for writing RESTful APIs, inspired by express.
    • mongoose (npm, GitHub): a client for a MongoDB that will map your models to your database.
    • q (GitHub): implements the promise abstraction in Node, which in my opinion is the best solution for handling asynchronous operations, and especially asynchronous errors.
  • Packages for unit testing:

A Small Plug

I'm giving a talk on unit testing at my HTML5 App Developers meetup next Monday! You should come.

Something went wrong with that request. Please try again.