Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Node Cookbook
Node Cookbook

Node Cookbook: Discover solutions, techniques, and best practices for server-side web development with Node.js 14 , Fourth Edition

eBook
£23.99 £26.99
Paperback
£33.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Node Cookbook

Chapter 2: Handling I/O

Prior to Node.js, JavaScript was predominantly used in the browser. Node.js brought JavaScript to the server and has enabled us to interact with the operating system with JavaScript. Today, Node.js is one of the most popular technologies for building server-side applications.

Node.js interacts with the operating system at a fundamental level: input and output. This chapter will explore the core APIs provided by Node.js that allow us to interact with the standard I/O, the file system, and the network stack.

This chapter will show you how to read and write files both synchronously and asynchronously. Node.js was built to handle asynchronous code and enable a non-blocking model. Understanding how to read and write asynchronous code is key learning, and it will show how to leverage the capabilities of Node.js.

We will also learn about the core modules provided by Node.js. We'll be focusing on the File System module, which enables you to interact with the file system and files.

This chapter will cover the following recipes:

  • Handling standard I/O
  • Managing files with fs module
  • Inspecting file metadata
  • Watching for file updates
  • Creating TCP server and client communication

Technical requirements

This chapter assumes that you have a recent version of Node.js 14 installed, a Terminal or shell, and an editor of your choice. The code for this chapter will be available on GitHub at https://github.com/PacktPublishing/Node.js-14-Cookbook in the Chapter02 directory.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Implement practical solutions for scaling, securing, and testing your Node.js web apps effectively
  • Build and deploy scalable microservices architecture with the power of Node.js 14
  • Discover techniques for debugging and testing Node.js applications

Description

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 practical guide will help you to get started with creating, debugging, and deploying your Node.js applications and cover solutions to common problems, along with tips to avoid pitfalls. You'll become familiar with the Node.js development model by learning how to handle files and build simple web applications and then explore established and emerging Node.js web frameworks such as Express.js and Fastify. As you advance, you'll discover techniques for detecting problems in your applications, handling security concerns, and deploying your applications to the cloud. This recipe-based guide will help you to easily navigate through various core topics of server-side web application development with Node.js. By the end of this Node book, you'll be well-versed with core Node.js concepts and have gained the knowledge to start building performant and scalable Node.js applications.

Who is this book for?

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.

What you will learn

  • Understand the Node.js asynchronous programming model
  • Create simple Node.js applications using modules and web frameworks
  • Develop simple web applications using web frameworks such as Fastify and Express
  • Discover tips for testing, optimizing, and securing your web applications
  • Create and deploy Node.js microservices
  • Debug and diagnose issues in your Node.js applications

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 25, 2020
Length: 512 pages
Edition : 4th
Language : English
ISBN-13 : 9781838554576
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Nov 25, 2020
Length: 512 pages
Edition : 4th
Language : English
ISBN-13 : 9781838554576
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 103.97
Node Cookbook
£33.99
Full-Stack React, TypeScript, and Node
£36.99
Node.js Web Development
£32.99
Total £ 103.97 Stars icon

Table of Contents

13 Chapters
Chapter 1: Introducing Node.js 14 Chevron down icon Chevron up icon
Chapter 2: Handling I/O Chevron down icon Chevron up icon
Chapter 3: Streams, Streams, Streams Chevron down icon Chevron up icon
Chapter 4: Using Web Protocols Chevron down icon Chevron up icon
Chapter 5: Developing Node.js modules Chevron down icon Chevron up icon
Chapter 6: Exploring Node.js web Frameworks Chevron down icon Chevron up icon
Chapter 7: Working with Databases Chevron down icon Chevron up icon
Chapter 8: Testing with Node.js Chevron down icon Chevron up icon
Chapter 9: Securing Node.js Applications Chevron down icon Chevron up icon
Chapter 10: Performance Optimization Chevron down icon Chevron up icon
Chapter 11: Deploying Node.js Microservices Chevron down icon Chevron up icon
Chapter 12: Debugging Node.js Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(11 Ratings)
5 star 63.6%
4 star 27.3%
3 star 0%
2 star 9.1%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Daniel Kanangila Jan 14, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is excellent for newbie and experienced Node.js developers. It's up-to-date and gives excellent explanations of large Node.js concepts in de detail with showcase examples.
Amazon Verified review Amazon
Aditya Munot Mar 17, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It’s contains are very easy to understand and implement.
Amazon Verified review Amazon
Seung C. Dec 29, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I wish I had this book when I was first starting to learn Node.js. The official Node documentation can be a bit difficult to get through for a new developer and this book was a great supplement that easily explains important concepts. The author does an excellent job of making the content succinct and easy to understand with the recipes and explanations. The book goes over a plethora of concepts and is a great read for anyone trying to expand their Node knowledge.
Amazon Verified review Amazon
M. Dec 20, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Want to learn Node.js, brush up on your skills, or discover the latest features of Node 14 and beyond? This book is for you! Written by a senior developer and Red Hatter, With a thorough presentation of everything Node, Bethany Griggs delivers from cover to cover in this latest Node Cookbook edition.
Amazon Verified review Amazon
Just Some Guy Sep 10, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a great resource for any serious Node developer. It was written for the Node 14.x release, but it's still useful today as most of the 'recipes' in the book are fairly timeless and still apply. There's more here for junior developers than seasoned Node pros, but given the breadth of topics covered (including more advanced issues such as streams, security, optimization, and runtime debugging), there's bound to be something helpful in this book for almost any Node developer.This book is a valuable resource I expect I'll refer to often for years to come. I give it top marks!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.