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
Conferences
Free Learning
Arrow right icon
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

eBook
€8.99 €29.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

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
€18.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
€189.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
€264.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 104.97
Mastering Node.js Web Development
€37.99
Modern Full-Stack React Projects
€33.99
React and React Native
€32.99
Total 104.97 Stars icon
Banner background image

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 the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela