Overview

0 Setting up Node.js and the JavaScript engine

This opening chapter sets the stage for learning Node.js by outlining what you’ll build, why the platform matters, and how the book is organized. It emphasizes a hands-on, incremental path to creating a full web application in JavaScript, pairing practical coding with the foundational concepts of how the web works. The learning journey spans from installing Node.js and essential tools through building features step by step, reinforced by capstone milestones that culminate in a complete, real-world app.

The chapter explains Node.js as a JavaScript runtime powered by the V8 engine, enabling developers to use one language across both client and server. It introduces the client-side versus server-side divide and shows how full‑stack JavaScript bridges it. A key focus is Node’s event‑driven, single‑threaded architecture: the event loop processes tasks asynchronously, offloading heavier work to the host system’s threads and processes. This model makes Node.js especially effective for I/O‑bound and real‑time applications such as streaming or chat.

Reasons to choose Node.js include consolidating on one language across the stack, strong performance and ongoing support through V8, an active ecosystem and community, and broad job opportunities. To get the most from the book, the chapter advises typing code yourself, practicing repeatedly, using the terminal, and pacing your learning through quick checks, exercises, and capstones. Across the units you’ll install tools, build a first app, adopt Express and MVC, connect to MongoDB, design models and CRUD operations, implement accounts and authentication, design secure RESTful APIs, add real‑time features with Socket.io, and deploy—ultimately gaining confidence to build and refine a production‑style application.

Simplified model of the Node.js event loop
Simplified model of the Node.js event-loop

   Summary

In this lesson, my objective was to teach you about the book’s structure, what Node.js is, and why it’s important. I also talked about how you should approach this book. If you treat this book as a course with subtopics and lectures, you’ll build your knowledge and skills incrementally until you become a competent web developer. In the next lesson, you install the tools that you need to get coding.

FAQ

What will I learn in this book?You will learn to build a complete web application with Node.js using JavaScript. The units progress from setup and fundamentals to Express and MVC, databases with MongoDB, CRUD operations, user accounts and security, RESTful APIs, real-time features with Socket.io, and deployment.
What is Node.js?Node.js is a platform for running JavaScript outside the browser. It lets you build server-side applications in JavaScript, enabling one language across both client and server.
Which JavaScript engine powers Node.js, and why does that matter?Node.js runs on Google’s V8 engine. V8 provides strong performance, wide support, and ongoing improvements, making Node.js a robust and future-friendly choice.
What is the difference between client-side and server-side development?Client-side (front-end) code runs in the user’s browser and handles the user interface and interactions. Server-side (back-end) code runs on the server, handling application logic, authentication, and database operations. JavaScript can be used for both, enabling full-stack development.
How does the Node.js event loop work?Node.js uses a single-threaded event loop that processes tasks from a queue. It handles I/O asynchronously and can offload heavier work to the system, making it efficient for many real-time and data-driven applications.
Does Node.js run each task to completion before starting the next?No. The event loop dequeues tasks sequentially but may offload tasks or await their completion while continuing to process new tasks, thanks to its asynchronous design.
What are threads and processes in the context of Node.js?The event loop runs on a single thread, but Node.js can use additional threads or processes for heavier tasks. Each Node.js app runs in its own process, and multiple processes can run in parallel to scale workloads.
Why choose Node.js over other platforms like Rails or PHP?Node.js lets you use one language (JavaScript) across the stack, excels at streaming and real-time features like chat, benefits from a large and active ecosystem, and maps well to job roles in both front-end and back-end development.
How should I prepare to get the most from the book?Type all code yourself, work through lessons carefully, practice with “Quick check” and “Try this” sections, and research JavaScript best practices as needed. Repeating exercises several times helps solidify concepts. You will build a capstone app (Confetti Cuisine) to apply what you learn.
What tools and setup are recommended?Install Node.js and use your terminal/command line. The book assumes a UNIX-style terminal; Windows users are encouraged to install Git Bash. Use an up-to-date Chrome browser for browser-based exercises. Source files use the .js extension, and examples typically use a main.js entry file.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Get Programming with Node.js ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Get Programming with Node.js ebook for free