Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
Mastering Node.js Web Development
Mastering Node.js Web Development

Mastering Node.js Web Development: Go on a comprehensive journey from the fundamentals to advanced web development with Node.js

Arrow left icon
Profile Icon Adam Freeman
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9 (8 Ratings)
Paperback Jun 2024 778 pages 1st Edition
eBook
$27.98 $39.99
Paperback
$49.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Adam Freeman
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9 (8 Ratings)
Paperback Jun 2024 778 pages 1st Edition
eBook
$27.98 $39.99
Paperback
$49.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$27.98 $39.99
Paperback
$49.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Mastering Node.js Web Development

Getting Ready

Node.js is a server-side JavaScript runtime that has become one of the most popular platforms for creating web applications. Node.js benefits from a vast library of packages and frameworks, providing every kind of feature and function imaginable, built on a rich API that Node.js provides for handling low-level tasks.

This book is different from most other Node.js books because it explains the relationship between the Node.js API and popular web application packages. Each chapter explains how a core feature required for web development can be implemented using the Node.js API, before replacing the custom implementation with a popular and well-tested open-source package.

Understanding the Node.js API gives you a solid understanding of how web application features really work, and using popular packages lets you build those features without having to write custom code. When problems arise, as they will in any project, your knowledge of the Node.js API will give...

Join our book community on Discord

https://packt.link/EarlyAccess

Node.js is a server-side JavaScript runtime that has become one of the most popular platforms for creating web applications. Node.js provides a rich API that handles common tasks and benefits from a vast library of open-source and commercial packages and frameworks that provide every kind of feature and function imaginable.

This book dives deep into the different ways that Node.js can be used to create web applications, with each feature described in detail so you understand what’s happening when you start your own Node.js web application project.

What do you need to know?

To follow the examples in this book, you should be familiar with HTML and CSS, and understand the basics of JavaScript development. I provide a primer for the JavaScript features that are useful for this book, but this isn’t a complete language tutorial.

How do you set up your development environment?

The development tools needed for Node.js development are set up in Chapter 2. Later chapters require additional tools and packages, but full instructions are provided.

What is the structure of this book?

This book is split into three parts, each of which covers a set of related topics.

  • Part 1, Putting Node.js in Context: Part 1 of this book provides the information you need to get started with Node.js development. It describes the tools required for Node.js development, the basic JavaScript features required to follow the examples in this book, and the core Node.js support for web applications.
  • Part 2, Node.js in Detail: Part 2 of this book covers the features required to create a fully featured web application, including producing HTML content, using databases, and creating RESTful web services. A custom implementation of each feature is used to explain how it works in detail, before being replaced with a popular open-source project to demonstrate how the same results can be achieved in a real project.
  • Part 3, SportsStore: The chapters in parts 1 and 2 focus on individual features, with deep dives that explain how that feature works and how it is...

Are there lots of examples?

There are loads of examples. The best way to learn is by example, and I have packed as many of them into this book as I can. To maximize the number of examples in this book, I have adopted a simple convention to avoid listing the same code or content repeatedly. When I create a file, I will show its full contents, just as I have in Listing 1.1. I include the name of the file and its folder in the listing’s header, and I show the changes that I have made in bold.

Listing 1.1. Asserting an Unknown Value in the index.ts File in the primer Folder
function getUKCapital() : string { 
    return "London";
}
function writeCity(f: () => string)  {
    console.log(`City: ${f()}`)
}
writeCity(getUKCapital);
writeCity(() => "Paris");
let myCity = "Rome";
writeCity(() => myCity);

This is a listing from Chapter 3, which shows the contents of a file called index.ts that can be found in the primer folder. Don’t worry about...

Where can you get the example code?

You can download the example projects for all the chapters in this book from https://github.com/PacktPublishing/Mastering-Node.js-Web-Development. The download is available without charge and contains everything that you need to follow the examples without having to type in all of the code.

What if you have problems following the examples?

The first thing to do is to go back to the start of the chapter and begin over. Most problems are caused by skipping a step or not fully applying the changes shown in a listing. Pay close attention to the emphasis in code listings, which highlights the changes that are required.

Next, check the errata/corrections list, which is included in the book’s GitHub repository. Technical books are complex, and mistakes are inevitable, despite my best efforts and those of my editors. Check the errata list for the list of known errors and instructions to resolve them.

If you still have problems, then download the project for the chapter you are reading from the book’s GitHub repository, https://github.com/PacktPublishing/Mastering-Node.js-Web-Development, and compare it to your project. I created the code for the GitHub repository by working through each chapter, so you should have the same files with the same contents in your project...

What if you find an error in the book?

You can report errors to me by email at adam@adam-freeman.com, although I ask that you first check the errata/corrections list for this book, which you can find in the book’s GitHub repository at https://github.com/PacktPublishing/Mastering-Node.js-Web-Development, in case it has already been reported.

I add errors that are likely to confuse readers, especially problems with example code, to the errata/corrections file on the GitHub repository, with a grateful acknowledgment to the first reader who reported it. I also publish a list of less serious issues, which usually means errors in the text surrounding examples, and which are unlikely to confuse.

How do you contact the author?

You can email me at adam@adam-freeman.com. It has been a few years since I started publishing an email address in my books. I wasn’t entirely sure that it was a good idea, but I am glad that I did it. I have received emails from around the world, from readers working or studying in every industry, and—for the most part, anyway—the emails are positive, polite, and a pleasure to receive.

I try to reply promptly, but I get many emails, and sometimes I get a backlog, especially when I have my head down trying to finish writing a book. I always try to help readers who are stuck with an example in the book, although I ask that you follow the steps described earlier in this chapter before contacting me.

While I welcome reader emails, there are some common questions for which the answers will always be “no.” I am afraid that I won’t write the code for your new startup, help you with your college assignment, get involved...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Server-side applications with Node.js, covering HTTP requests, static and dynamic content delivery, form data processing, and RESTful web services
  • Hands-on examples, step-by-step code listings, and best practices for building and deploying server applications
  • Common services like authentication, managing application state, and performance optimization

Description

Dive into the world of Node.js with this comprehensive guide, taking you from foundational concepts to practical web development mastery. Written by an industry veteran with over 50 programming books under his belt, this book will help both beginners and seasoned developers. Gain a deep understanding of the most important server-side features in web development with Node.js. The first part of the book will get you up to speed with basic features of Node.js and TypeScript. In the second part, you’ll elevate your skills by creating simplified implementations of key server-side features to understand how they work and how they are presented to clients. Armed with the understanding gained from implementing each feature, you will be able to replace custom code with production-ready open-source packages. The third part will help you understand how server-side features are combined for practical web development. Using Adam Freeman’s signature SportsStore application, you will learn how to develop client and server-side components, culminating in a thorough application deployment preparation. By the end of this Node.js book, you will be able to build and deploy server applications to support HTTP clients, including JavaScript applications created with frameworks such as Angular and React.

Who is this book for?

This book is for programmers with a basic knowledge of HTML and CSS who are transitioning into JavaScript development and are looking to master the implementation of server-side applications.

What you will learn

  • Process HTTP requests and perform file operations
  • Create RESTful web services that can be consumed by client-side apps
  • Work with server apps serving JavaScript clients, such as React and Angular
  • Leverage Node.js to work with popular databases
  • Apply practical knowledge through building the SportsStore project
  • Authenticate users and authorize access to application features

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 24, 2024
Length: 778 pages
Edition : 1st
Language : English
ISBN-13 : 9781804615072
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Jun 24, 2024
Length: 778 pages
Edition : 1st
Language : English
ISBN-13 : 9781804615072
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 $ 138.97
React and React Native
$43.99
Modern Full-Stack React Projects
$44.99
Mastering Node.js Web Development
$49.99
Total $ 138.97 Stars icon

Table of Contents

26 Chapters
Putting Node.js in Context Chevron down icon Chevron up icon
Getting Ready Chevron down icon Chevron up icon
Working with the Node.js Tools Chevron down icon Chevron up icon
JavaScript and TypeScript Primer Chevron down icon Chevron up icon
Understanding Node.js Concurrency Chevron down icon Chevron up icon
Handling HTTP Requests Chevron down icon Chevron up icon
Using Node.js Streams Chevron down icon Chevron up icon
Using Bundles and Content Security Chevron down icon Chevron up icon
Unit Testing and Debugging Chevron down icon Chevron up icon
Node.js in Detail Chevron down icon Chevron up icon
Creating the Example Project Chevron down icon Chevron up icon
Using HTML Templates Chevron down icon Chevron up icon
Handling Form Data Chevron down icon Chevron up icon
Using Databases Chevron down icon Chevron up icon
Using Sessions Chevron down icon Chevron up icon
Creating RESTful Web Services Chevron down icon Chevron up icon
Authenticating and Authorizing Requests Chevron down icon Chevron up icon
SportsStore Chevron down icon Chevron up icon
SportsStore: A Real Application Chevron down icon Chevron up icon
SportsStore: Navigation and Cart Chevron down icon Chevron up icon
SportsStore: Orders and Validation Chevron down icon Chevron up icon
SportsStore: Authentication Chevron down icon Chevron up icon
SportsStore: Administration Chevron down icon Chevron up icon
SportsStore: Deployment Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index 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.9
(8 Ratings)
5 star 87.5%
4 star 12.5%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Giuseppe Nov 09, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good book! Well done!
Subscriber review Packt
N/A Oct 07, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excelent
Feefo Verified review Feefo
A. Zubarev Jun 27, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am still digesting this book (at about half of through), but it answered my relatively newbie questions already and I found the most difficult (for me it was the Node's code execution, concurrency model) topics explained so well I am not worried I can embrace the modern NodeJS - based Web development.I found the most precious the topics on data models, debugging and RESTFULL services ( I am on a data wrangling spree ). The real application example is a real gem - allows to solidify and repeat learn the material.The harder parts I wish could be easier are the ones on security, Docker and deployment in general.My advice for a book reader - learn the NPM commands and make helper scripts.
Amazon Verified review Amazon
Kieran Aug 02, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am a C# developer and have touched on JS and TS when creating web applications, so I already have a basic understanding of them. However, this book would be great for someone with absolutely no experience with either as it takes you through all aspects required to progress through the books chapters culminating in the creation of a store with database support and full data validation. It even covers creating a docker image from the finished project.Overall a great read for beginners, I would highly recommend.
Amazon Verified review Amazon
Mike Rourke Jul 01, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book does an excellent job of covering development with Node.js and the surrounding web ecosystem. It starts from the ground up by introducing the required tooling and providing an overview of JavaScript and TypeScript. It runs the gamut on what you would normally be expected to know when building a Node.js app: HTTP, streams, HTML templates, databases, authentication, etc.For folks new to Node.js, this book will help get you up and running with a production grade app. For seasoned Node.js developers, it provides a good reference for filling in the blanks in your knowledge (or at least blowing the dust off the knowledge you already have).The book also covers some niche stuff like worker threads, which is nice if you don’t feel like scouring the web to figure out how to use them. I like how the author walks you through building an entire app in the last few chapters. Overall, I’d say it’s definitely worth a read!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.