Write Node.js code that scales, whether it comes from you or AI, and avoid the anti-patterns that cause performance and production problems
Key Features:
- Identify and fix common Node.js anti-patterns before they impact production
- Avoid performance bottlenecks by understanding Node.js internals
- Apply proven patterns to write clean, maintainable, and scalable Node.js code
Book Description:
Node.js makes it easy to get started, but just as easy to get things wrong.
Whether you're writing code yourself or using AI in your development workflow, How Not to Node.js takes a practical, no-nonsense approach to uncovering the most common mistakes developers make, and shows you exactly how to avoid them.
The book is structured around real-world anti-patterns, guiding you through how to identify, understand, and fix problematic code. You'll start by learning how patterns and anti-patterns shape application design, before diving into asynchronous pitfalls, event loop behavior, and error handling. As you progress, you'll explore architectural concerns such as logging, environment management, and memory leaks.
By the end, you won't just know how to write or review Node.js code, you'll know how to avoid writing bad Node.js code, building applications that are clean, scalable, and production-ready.
What You Will Learn:
- Recognize common JavaScript and Node.js anti-patterns and refactor them effectively
- Write clean, maintainable code by avoiding common code smells and bad practices
- Manage environment variables securely and efficiently
- Keep the event loop responsive by avoiding blocking code and offloading CPU-heavy work
- Diagnose and fix memory leaks using profiling and heap analysis tools
- Handle asynchronous operations correctly using promises and async/await
Who this book is for:
This book is for Node.js developers who want to level up from writing code that works to writing code that scales.
Whether you're an early-career developer struggling with asynchronous patterns or an experienced engineer dealing with performance and production issues, this book will help you identify what's going wrong and how to fix it.
Table of Contents
- Understanding the Concept of Patterns and Anti-patterns
- Spotting and Solving Anti-patterns in JavaScript
- Staying Away from Smelly Code
- Dealing with the Most Common Anti-patterns in Node.js
- Understanding Promises and Callbacks
- Logging Done Right
- Taming Your Environment
- What is Synchronous and What is Asynchronous
- Memory Leaks and Where They Come From
外文書商品之書封,為出版社提供之樣本。實際出貨商品,以出版社所提供之現有版本為主。部份書籍,因出版社供應狀況特殊,匯率將依實際狀況做調整。
無庫存之商品,在您完成訂單程序之後,將以空運的方式為你下單調貨。為了縮短等待的時間,建議您將外文書與其他商品分開下單,以獲得最快的取貨速度,平均調貨時間為1~2個月。
為了保護您的權益,「三民網路書店」提供會員七日商品鑑賞期(收到商品為起始日)。
若要辦理退貨,請在商品鑑賞期內寄回,且商品必須是全新狀態與完整包裝(商品、附件、發票、隨貨贈品等)否則恕不接受退貨。