Book description
Build your first production-grade web app from scratch using Node.js, Express, MongoDB, authentication, and testing with guidance from a member of the Express Technical Committee as well as a Node.js core collaborator and releaser
Key Features
- Learn JavaScript, async programming, and event-driven architectures in Node.js
- Discover best practices for secure deployment and testing of Node.js apps
- Build a feature-rich web app from scratch using MongoDB, Express.js, and passport.js, including testing
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
Node.js revolutionizes server-side JavaScript development and empowers developers to build efficient, scalable, and versatile applications across a range of use cases. This book is written by a Node.js core collaborator and releaser and is the only book for beginners on Node.js. It takes you on a progressive learning path that will give you the skills needed to leverage Node.js.
You’ll learn Node.js fundamentals and refresh your knowledge of JavaScript before transitioning to the development of modern web applications using Node.js, Express.js, and MongoDB. You’ll get hands-on with complex topics such as asynchronous programming, npm libraries, event-driven patterns for HTTP servers, RESTful API, and JSON Web Tokens. The final chapters will walk you through the deployment process, offering insights into various strategies, including bare metal setups, virtual machines, and containerization with Docker. You’ll also be guided through the use of Process Manager 2 (PM2) for efficient process management.
By the end of this Node.js book, you'll have the skills to craft, test, and deploy Node.js web applications confidently and use this powerful stack in your day-to-day projects.
What you will learn
- Build solid and secure Node.js applications from scratch
- Discover how to consume and publish npm packages effectively
- Master patterns for refactoring and evolving your applications over time
- Gain a deep understanding of essential web development principles, including HTTP, RESTful API design, JWT, authentication, authorization, and error handling
- Implement robust testing strategies to enhance the quality and reliability of your applications
- Deploy your Node.js applications to production environments using Docker and PM2
Who this book is for
This book is for developers eager to learn Node.js swiftly and utilize it for web app development. Front-end developers looking to delve into back-end development or become full-stack developers using Node.js will also benefit from this book’s comprehensive coverage of topics. Before you get started with this book, you’ll need to be familiar with the basics of coding (JavaScript programming or another language), Git and/or GitHub, and front-end development, as these topics aren’t covered in the book.
Table of contents
- Node.js for Beginners
- Contributors
- About the author
- About the reviewers
- Preface
- Part 1: Node.js Overview and JavaScript Language
- Chapter 1: Introduction to Node.js
- Chapter 2: Setting Up the Development Environment
-
Chapter 3: JavaScript Fundamentals
- Technical requirements
- JavaScript is a powerful language
- Understanding versioning – TC39
- Exploring JavaScript documentation
- Linting JavaScript code
- Commenting JavaScript code
- Printing values and debugging
- Variables and constants
- Understanding data types
- Exploring numbers
- Exploring Dates object
- Conditional statements
- Understanding loops
- Using strings in JavaScript
- Exploring arrays
- Using objects in JavaScript
- Exploring functions
- Creating and managing classes
- Summary
- Further reading
- Chapter 4: Asynchronous Programming
- Part 2: Node.js Ecosystem and Architecture
- Chapter 5: Node.js Core Libraries
-
Chapter 6: External Modules and npm
- Technical requirements
- Managing the application with package.json
- Choosing the correct dependencies for your project
- Installing dependencies
- Removing dependencies
- Understanding the package-lock.json
- Managing dependencies versions
- Building Isomorphic JavaScript
- Using npm scripts
- Executing packages directly with NPX
- npm alternatives
- Publishing your first package
- Summary
- Further reading
- Chapter 7: Event-Driven Architecture
- Chapter 8: Testing in Node.js
- Part 3: Web Application Fundamentals
- Chapter 9: Handling HTTP and REST APIs
- Chapter 10: Building Web Applications with Express
- Part 4: Building Solid Web Applications with Node.js
- Chapter 11: Building a Web Application Project from Scratch
- Chapter 12: Data Persistence with MongoDB
- Chapter 13: User Authentication and Authorization with Passport.js
- Chapter 14: Error Handling in Node.js
- Chapter 15: Securing Web Applications
- Part 5: Mastering Node.js Deployment and Portability
- Chapter 16: Deploying Node.js Applications
- Chapter 17: Dockerizing a Node.js Application
- Index
- Other Books You May Enjoy
Product information
- Title: Node.js for Beginners
- Author(s):
- Release date: May 2024
- Publisher(s): Packt Publishing
- ISBN: 9781803245171
You might also like
video
Node.js - The Complete Guide
Node.js is one of the most popular and modern server-side programming languages and is used widely …
book
Efficient Node.js
Take your web development skills from browser to server with Node.js, the popular backend framework used …
book
JavaScript from Beginner to Professional
Start your journey towards becoming a JavaScript developer with the help of more than 100 fun …
book
Node.js: Novice to Ninja
Node.js: Novice to Ninja is your hands-on guide to learning everything needed to build a professional …