This is the code repository for Node Cookbook - Fourth Edition, published by Packt.
Discover solutions, techniques, and best practices for server-side web development with Node.js 14
A key technology for building web applications and tooling, Node.js brings JavaScript to the server enabling full-stack development in a common language. This fourth edition of the Node Cookbook is updated with the latest Node.js features and the evolution of the Node.js framework ecosystems.
This book covers the following exciting features:
- Understand the async and sync programming models of Node.js
- Create simple Node.js applications using modules and web frameworks
- Debug and diagnose issues in your Node.js applications
- Deploy Node.js applications to production
- Create a simple web app using Fastify, Hapi, and Express.js
- Discover tips for scaling, securing, and testing your Node.js web applications
If you feel this book is for you, get your copy today!
All of the code is organized into folders. For example, Chapter02.
The code will look like the following:
process.stdin.on("data", (data) => {
const name = data.toString().trim().toUpperCase();
if (name !== "") {
process.stdout.write(`Hello ${name}!`);
} else {
process.stderr.write("Input was empty.");
}
})
Following is what you need for this book:
The book is for web developers who have knowledge of JavaScript and want to gain a broad understanding of Node.js concepts for server-side development.
With the following software and hardware list you can run all code files present in the book (Chapter 1-12).
Chapter | Software required | OS required |
---|---|---|
1-12 | Node.js 14 (including anpm) | Windows, MacOS, and Linux (Any) |
1-12 | Google Chrome | Windows, MacOS, and Linux (Any) |
1-12 | cURL - Downloadable from https://curl.haxx.se/windows/ | Windows, MacOS, and Linux (Any) |
1-12 | Docker | Windows, MacOS, and Linux (Any) |
11 | Kubernetes (via Docker for Desktop) | Windows and MacOS |
Any chapters or recipes that require special software should cover the installation steps in the Technical requirements or Getting ready sections. Many of the Terminal steps assume you're operating in a Unix environment. On Windows, you should be able to use the Windows Subsystem for Linux (WSL 2) to complete these steps.
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.
Bethany Griggs is a Senior Software Engineer at Red Hat and a Node.js Technical Steering Committee Member. Beth has been involved with the Node.js project since 2016 when she joined IBM in their Node.js Runtime Team. Now at Red Hat, she’s continuing her work around Node.js, including contributing to the Node.js project. Beth is an active member of the Node.js Release Working Group, who audit the content for and produce the Node.js releases. Her other focuses are the creation of resources and tools to support Node.js deployments to cloud.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.