small medium large xlarge

Node.js 8 the Right Way: Practical, Server-Side JavaScript That Scales


Cover image for Node.js 8 the Right Way

Node.js 8 the Right Way

Practical, Server-Side JavaScript That Scales


Node.js is the platform of choice for creating modern web services. This fast-paced book gets you up to speed on server-side programming with Node.js 8, as you develop real programs that are small, fast, low-profile, and useful. Take JavaScript beyond the browser, explore dynamic language features, and embrace evented programming. Harness the power of the event loop and non-blocking I/O to create highly parallel microservices and applications. This expanded and updated second edition showcases the latest ECMAScript features, current best practices, and modern development techniques.

Customer Reviews

Node.js 8 the Right Way is an excellent guide for building robust Node.js applications and making use of the extensive Node.js ecosystem. Using realistic applications from several different domains, it gives a highly useful and thorough description of the process of building, testing, and deploying real-world Node.js programs.

- Dan Scales

Principal Engineer, Google, Inc.

Without the original Node.js the Right Way, I wouldn’t be where I am today. This book leapfrogged me from being a casual Node.js developer to loving the event loop and knowing how to build effective distributed systems in Node.js. It led me to writing clean, idiomatic, and highly understandable JavaScript—both in Node.js and in the browser. This update will do the same for readers.

- Kyle Kelley

Senior Software Engineer, Netflix

Jim’s update to his engaging, wide-ranging deep dive into how to solve actual problems using Node.js taught even this old dog some new tricks. Hats off to Jim for clearly demonstrating how to get the most out of Node.js.

- Mark Trostler

Software Engineer, Google, Inc.

Jim Wilson shows the correct way, the way that will definitely make you a better Node.js developer, giving you many techniques, insights, and—most of all—some really cool stuff. Node.js 8 the Right Way provides loads of good practices and reveals some of the lower-level interactions of Node with the system. In a Node.js shop, this book is a must for seniors’ reference and a must for new hires.

- Peter Perlepes

Software Engineer, Growth

See All Reviews

Choose Your Format(s)

  • $35.95 In Stock

    Save $11.95 on the combo pack.

  • $27.95 In Stock
  • $19.95 In Stock
  • Ebooks are DRM free.

  • Ebook delivery options.

What You Need

  • Node.js 8.x
  • Operating system with bash-like shell
  • ØMQ (pronounced “Zero-M-Q”) library, version 3.2 or higher
  • Elasticsearch version 5.2 or higher
  • jq version 1.5 or higher
  • Redis version 3.2 or higher

Contents & Extracts

  • Preface
  • Getting Up to Speed on Node.js 8
    • Getting Started
      • Thinking Beyond the web
      • Node.js’s Niche
      • How Node.js Applications Work
      • Aspects of Node.js Development
      • Installing Node.js
    • Wrangling the File System excerpt
      • Programming for the Node.js Event Loop
      • Spawning a Child Process
      • Capturing Data from an EventEmitter
      • Reading and Writing Files Asynchronously
      • The Two Phases of a Node.js Program
      • Wrapping Up
    • Networking with Sockets
      • Listening for Socket Connections
      • Implementing a Messaging Protocol
      • Creating Socket Client Connections
      • Testing Network Application Functionality
      • Extending Core Classes in Custom Modules
      • Developing Unit Tests with Mocha
      • Wrapping Up
    • Connecting Robust Microservices
      • Installing ØMQ
      • Publishing and Subscribing to Messages
      • Responding to Requests
      • Routing and Dealing Messages
      • Clustering Node.js Processes
      • Pushing and Pulling Messages
      • Wrapping Up
  • Working with Data
    • Transforming Data and Testing Continuously
      • Procuring External Data
      • Behavior-Driven Development with Mocha and Chai excerpt
      • Extracting Data from XML with Cheerio
      • Processing Data Files Sequentially
      • Debugging Tests with Chrome DevTools
      • Wrapping Up
    • Commanding Databases
      • Introducing Elasticsearch
      • Creating a Command-Line Program in Node.js with Commander
      • Using request to Fetch JSON over HTTP
      • Shaping JSON with jq
      • Inserting Elasticsearch Documents in Bulk
      • Implementing an Elasticsearch Query Command
      • Wrapping Up
  • Creating an Application from the Ground Up
    • Developing RESTful Web Services
      • Advantages of Express
      • Serving APIs with Express
      • Writing Modular Express Services
      • Keeping Services Running with nodemon
      • Adding Search APIs
      • Simplifying Code Flows with Promises
      • Manipulating Documents RESTfully
      • Emulating Synchronous Style with async and await excerpt
      • Providing an Async Handler Function to Express
      • Wrapping Up
    • Creating a Beautiful User Experience
      • Getting Started with webpack
      • Generating Your First webpack Bundle
      • Sprucing Up Your UI with Bootstrap
      • Bringing in Bootstrap JavaScript and jQuery
      • Transpiling with TypeScript
      • Templating HTML with Handlebars
      • Implementing hashChange Navigation
      • Listing Objects in a View
      • Saving Data with a Form
      • Wrapping Up
    • Fortifying Your Application
      • Setting Up the Initial Project
      • Managing User Sessions in Express
      • Adding Authentication UI Elements
      • Setting Up Passport
      • Authenticating with Facebook, Twitter, and Google
      • Composing an Express Router
      • Bringing in the Book Bundle UI
      • Serving in Production
      • Wrapping Up


Jim R. Wilson is a software engineer at Google creating data visualizations on the Big Picture team. He’s contributed to TensorFlow’s visualization suite, TensorBoard, and other open source projects.