Video description
Node.js is one of the most popular and modern server-side programming languages and is used widely from traditional web apps with server-side rendered views over REST APIs to GraphQL APIs and real-time web services. With the high demand for Node.js developers in the job market, now is the time to develop Node.js skills. This updated video course will teach you all that you need from scratch.
The course begins with an introduction to Node.js and a quick refresher on JavaScript. You’ll then understand the improved development workflow and debugging, get to grips with Express.js, and work with dynamic content and add template engines. As you progress, you’ll work with the model view controller (MVC) to develop user interfaces and learn the dynamic route and advanced models. The course will also take you through using Node.js with SQL, NoSQL, and Mongoose and help you gain a solid understanding of implementing authentication, sending emails, error handling, validation, file uploading and downloading, and pagination. Finally, you’ll work with REST and GraphQL APIs, DenoJS, build a real-time Node.js app with WebSockets, perform automation testing, and deploy a Node.js application.
By the end of this course, you’ll have developed the Node.js skills needed to build robust, scalable, and powerful web applications.
What You Will Learn
- Use Node.js to parse requests and send responses
- Implement user authentication and authorization
- Handle payment requests with Stripe.js
- Discover how to build GraphQL APIs
- Build a real-time Node.js App with Websockets
- Get a thorough introduction to DenoJS
Audience
This updated course is for the beginners as well as experienced web developers looking to learn backend (server-side) development with Node.js. If you are interested in building modern, scalable, and high-performing web applications or want to explore updated features such as modern JavaScript, Typescript, GraphQL, and DenoJS, you’ll find this course useful. Basic knowledge of JavaScript is needed to get started with this course.
About The Author
Academind by Maximilian Schwarzmüller:
Academind GmbH
Bundling the courses and the knowledge of successful instructors, Academind strives to deliver high-quality online education. The platform covers topics such as web development, data analysis, and more in a fun and engaging way.
Maximilian Schwarzmüller
Since the age of 13, he has never stopped learning new programming skills and languages. In his early days, he started creating websites simply for fun. This passion has remained and shaped his decision to work as a freelance web developer and consultant. Although he started web development on the backend (PHP with Laravel and NodeJS), he has progressed to becoming a front-end developer using modern frameworks such as React, Angular, and VueJS 2 in many projects.
The most rewarding experience for him is to see how people find new and better jobs, build exciting web applications, acquire amazing projects, or simply enjoy their hobby with the help of his content.
Publisher resources
Table of contents
- Chapter 1 : Introduction
-
Chapter 2 : Optional: JavaScript - A Quick Refresher
- Module Introduction
- JavaScript in a Nutshell
- Refreshing the Core Syntax
- Let and Const
- Understanding Arrow Functions
- Working with Objects, Properties, and Methods
- Arrays and Array Methods
- Arrays, Objects, and Reference Types
- Understanding Spread and Rest Operators
- Destructuring
- Async Code and Promises
- Wrap up
-
Chapter 3 : Understanding the Basics
- Module Introduction
- How the Web Works?
- Creating a Node Server
- The Node Lifecycle and Event Loop
- Understanding Requests
- Sending Responses
- Routing Requests
- Redirecting Requests
- Parsing Request Bodies
- Understanding Event Driven Code Execution
- Blocking and Non-Blocking Code
- Node.js - Looking Behind the Scenes
- Using the Node Modules System
- Wrap Up
-
Chapter 4 : Improved Development Workflow and Debugging
- Module Introduction
- Understanding Node Package Manager (NPM) Scripts
- Installing Third Party Packages
- Using Nodemon for Auto Restarts
- Understanding Different Error Types
- Finding and Fixing Syntax Errors
- Dealing with Runtime Errors
- Logical Errors
- Using the Debugger
- Restarting the Debugger Automatically After Editing your App
- Changing Variables in the Debug Console
- Wrap Up
-
Chapter 5 : Working with Express.js
- Module Introduction
- What is Express.js?
- Installing Express.js
- Adding Middleware
- How Middleware Works?
- Express.js - Looking Behind the Scenes
- Handling Different Routes
- Parsing Incoming Requests
- Limiting Middleware Execution to POST Requests
- Using Express Router
- Adding a 404 Error Page
- Filtering Paths
- Creating HTML Pages
- Serving HTML Pages
- Returning a 404 Page
- Using a Helper Function for Navigation
- Styling your Pages
- Serving Files Statically
- Wrap Up
-
Chapter 6 : Working with Dynamic Content and Adding Templating Engines
- Module Introduction
- Sharing Data across Requests and Users
- Templating Engines - An Overview
- Installing and Implementing Pug
- Outputting Dynamic Content
- Converting HTML Files to Pug
- Adding a Layout
- Finishing the Pug Template
- Working with Handlebars
- Converting your Project to Handlebars
- Adding a Layout to Handlebars
- Working with Embedded JavaScript Templating (EJS)
- Working on the Layout with Partials
- Wrap Up
- Chapter 7 : The Model View Controller (MVC)
- Chapter 8 : Optional: Enhancing the App
-
Chapter 9 : Dynamic Routes and Advanced Models
- Module Introduction
- Preparations
- Adding the Product ID to the Path
- Extracting Dynamic Params
- Loading Product Detail Data
- Rendering the Product Detail View
- Passing Data with POST Requests
- Adding a Cart Model
- Using queryParams
- Pre-Populating the Edit Product Page with Data
- Linking to the Edit Page
- Editing the Product Data
- Adding the Delete Functionality for a Product
- Deleting Cart Items
- Displaying Cart Items on the Cart Page
- Deleting Cart Items
- Fixing a Delete Product Bug
- Wrap Up
-
Chapter 10 : SQL Introduction
- Module Introduction
- Choosing a Database
- NoSQL Introduction
- Comparing SQL and NoSQL
- Setting up MySQL
- Connecting the App to the SQL Database
- Basic SQL and Creating a Table
- Retrieving Data
- Fetching Products
- Fetching Products - Time to Practice
- Inserting Data into the Database
- Fetching a Single Product with the "WHERE" Clause
- Wrap Up
-
Chapter 11 : Understanding Sequelize
- Module Introduction
- What is Sequelize?
- Connecting to the Database
- Defining a Model
- Syncing JavaScript Definitions to the Database
- Inserting Data and Creating a Product
- Retrieving Data and Finding Products
- Fetching a Single Product with the "WHERE" clause
- Fetching Admin Products
- Updating Products
- Deleting Products
- Creating a User Model
- Adding a One-To-Many Relationship
- Creating and Managing a Dummy User
- Using Magic Association Methods
- Fetching Related Products
- One-To-Many and Many-To-Many Relations
- Creating and Fetching a Cart
- Adding New Products to the Cart
- Adding Existing Products and Retrieving Cart Items
- Deleting Related Items and Deleting Cart Products
- Adding an Order Model
- Storing Cart items as Order items
- Resetting the Cart and Fetching and Outputting Orders
- Wrap Up
-
Chapter 12 : Working with NoSQL and Using MongoDB
- Module Introduction
- What is MongoDB?
- Relations in NoSQL
- Setting up MongoDB
- Installing the MongoDB Driver
- Creating the Database Connection
- Finishing the Database Connection
- Using the Database Connection
- Creating Products
- Understanding the MongoDB Compass
- Fetching All Products
- Fetching a Single Product
- Making the "Edit" "Delete" Buttons Work Again
- Working on the Product Model to Edit the Product
- Finishing the "Update Product" Code
- Important Note on Updating Products
- Deleting Products
- Fixing the "Add Product" Functionality
- Creating New Users
- Storing the User in the Database
- Working on Cart Items and Orders
- Adding the "Add to Cart" Functionality
- Storing Multiple Products in the Cart
- Displaying the Cart Items
- Fixing a Bug
- Deleting Cart Items
- Adding an Order
- Adding Relational Order Data
- Getting Orders
- Removing Deleted Items from the Cart
- Wrap Up
-
Chapter 13 : Working with Mongoose
- Module Introduction
- What is Mongoose?
- Connecting to the MongoDB Server with Mongoose
- Creating the Product Schema
- Saving Data through Mongoose
- Fetching all Products
- Fetching a Single Product
- Updating Products
- Deleting Products
- Adding and Using a User Model
- Using Relations in Mongoose
- Important Thing about Fetching Relations
- Working on the Shopping Cart
- Loading the Cart
- Deleting Cart Items
- Creating and Getting Orders
- Storing all Order Related Data
- Clearing the Cart after Storing an Order
- Getting and Displaying the Orders
- Wrap Up
-
Chapter 14 : Sessions and Cookies
- Module Introduction
- What is a Cookie?
- The Current Project Status
- Optional: Creating the Login Form
- Adding a Request-Driven Login Solution
- Setting a Cookie
- Manipulating Cookies
- Configuring Cookies
- What is a Session?
- Initializing the Session Middleware
- Using the Session Middleware
- Using MongoDB to Store Sessions
- Sessions and Cookies - A Short Summary
- Deleting a Cookie
- Fixing Some Minor Bugs
- Making "Add to Cart" Work Again
- Two Tiny Improvements
- Wrap Up
-
Chapter 15 : Adding Authentication
- Module Introduction
- What is Authentication?
- How is Authentication Implemented?
- Updated Project Status
- Implementing an Authentication Flow
- Encrypting Passwords
- Adding a Tiny Code Improvement
- Adding the Sign in Functionality
- Working on Route Protection
- Using Middleware to Protect Routes
- Understanding Cross-Site Request Forgery (CSRF) Attacks
- Using a Cross-Site Request Forgery (CSRF) Token
- Adding Cross-Site Request Forgery (CSRF) Protection
- Fixing the Order Button
- Providing User Feedback
- Optional: Styling Error Messages
- Finishing the Flash Messages
- Adding Additional Flash Messages
- Wrap Up
- Chapter 16 : Sending Emails
- Chapter 17 : Advanced Authentication
-
Chapter 18 : Understanding Validation
- Module Introduction
- Why Should we use Validation?
- How to Validate Input?
- Setup Basic Validation
- Using Validation Error Messages
- Built-In Custom Validators
- More Validators
- Checking for Field Equality
- Adding Async Validation
- Keeping User Input
- Adding Conditional CSS Classes
- Adding Validation to Login
- Sanitizing Data
- Validating Product Addition
- Validating Product Editing
- Wrap Up
-
Chapter 19 : Error Handling
- Module Introduction
- Types of Errors and Error Handling
- Analyzing Error Handling in the Current Project
- Errors - Some Theory
- Throwing Errors in Code
- Returning Error Pages
- Using the Express.js Error Handling Middleware
- Updating the App
- Using the Error Handling Middleware Correctly
- Status Codes
- Wrap Up
-
Chapter 20 : File Upload and Download
- Module Introduction
- Adding a File Picker to the Frontend
- Handling Multipart Form Data
- Handling File Uploads with Multer
- Configuring Multer to Adjust Filename and File Path
- Filtering Files by MIME type
- Storing File Data in the Database
- Serving Images Statically
- Downloading Files with Authentication
- Setting Up File Type Headers
- Restricting File Access
- Streaming Data vs Preloading Data
- Using PDFKit for .pdf Generation
- Generating .pdf Files with Order Data
- Deleting Files
- Fixing Invoice Links
- Wrap Up
- Chapter 21 : Adding Pagination
- Chapter 22 : Understanding Async Requests
- Chapter 23 : Adding Payments
-
Chapter 24 : Working with REST APIs - The Basics
- Module Introduction
- What Are REST APIs and Why Do We Use Them?
- Accessing Data with REST APIs
- Understanding Routing and HTTP Methods
- REST APIs - The Core Principles
- Creating our REST API Project and Implementing the Route Setup
- Sending Requests and Responses and Working with Postman
- REST APIs, Clients, and Cross-Origin Resource Sharing (CORS) Errors
- Sending POST Requests
- Wrap Up
-
Chapter 25 : Working with REST APIs - The Practical Application
- Module Introduction
- REST APIs and the Rest of the Course
- Understanding the Frontend Setup
- Planning the API
- Fetching Lists of Posts
- Adding a Create Post Endpoint
- Adding Server-Side Validation
- Setting up a Post Model
- Storing Posts in the Database
- Static Images and Error Handling
- Fetching a Single Post
- Uploading Images
- Updating Posts
- Deleting Posts
- Adding Pagination
- Adding a User Model
- Adding User Signup Validation
- Signing Users up
- How Does Authentication Work?
- Starting with User Login
- Log in and Creating JSON Web Tokens (JWTs)
- Using and Validating the Token
- Adding Auth Middleware to all Routes
- Connecting Posts and Users
- Adding Authorization Checks
- Clearing Post-User Relations
- Wrap Up
- Chapter 26 : Understanding Async/Await in Node.js
-
Chapter 27 : Understanding WebSocket Socket.io
- Module Introduction
- What Are WebSocket and Why Would You Use Them?
- WebSocket Solutions - An Overview
- Setting up Socket.io on the Server
- Establishing a Connection from the Client
- Identifying Realtime Potential
- Sharing the IO Instance Across Files
- Synchronizing POST Additions
- Fixing a Bug - The Missing Username
- Updating Posts on all Connected Clients
- Sorting Correctly
- Deleting Posts across Clients
- Wrap Up
-
Chapter 28 : Working with GraphQL
- Module Introduction
- What is GraphQL?
- Understanding the Setup and Writing First Query
- Defining a Mutation Schema
- Adding a Mutation Resolver and GraphQL
- Adding Input Validation
- Handling Errors
- Connecting the Frontend to the GraphQL API
- Adding a Login Query and a Resolver
- Adding Login Functionality
- Adding a "Create Post" Mutation
- Extracting User Data from the Auth Token
- Sending the "Create Post" Query
- Fixing a Bug and Adding New Posts Correctly
- Adding a "Get Post" Query and Resolver
- Sending "Create Post" and "Get Post" Queries
- Adding Pagination
- Uploading Images
- Viewing a Single Post
- Updating Posts
- Deleting Posts
- Managing the User Status
- Using Variables
- Fixing a Pagination Bug
- Wrap Up
-
Chapter 29 : Deploying the App
- Module Introduction
- Deploying Different Kinds of Apps
- Deployment Preparations
- Using Environment Variables
- Using Production API Keys
- Setting Secure Response Headers with Helmet
- Compressing Assets
- Setting up Request Logging
- Setting up a Secure Sockets Layer (SSL) Server
- Using a Hosting Provider
- Understanding the Project and the Git Setup
- A Deployment Example with Heroku
- Deploying APIs
-
Chapter 30 : Testing Node.js Applications
- Module Introduction
- What is Testing?
- Testing - Why and How?
- Setup and Writing the First Test
- Testing the Auth Middleware
- Organizing Multiple Tests
- What Not to Test!
- Using Stubs
- Testing Controllers
- Testing Asynchronous Code
- Setting up a Testing Database
- Testing Code with an Active Database
- Cleaning Up
- Hooks
- Testing Code That Requires Authentication
- Wrap up and Mastering Tests
- Chapter 31 : Node.js as a Build Tool and Using NPM
- Chapter 32 : Modern JavaScript and Node.js
-
Chapter 33 : Node.js and TypeScript
- Module Introduction
- TypeScript: What and Why?
- TypeScript Setup
- Assigning Types
- Type Inference and Type Casting
- Configuring TypeScript
- Working with Union Types
- Using Object and Array Types
- Working with Type Aliases and Interfaces
- Understanding Generics
- A First Summary
- Node and TypeScript: Setup
- Getting Started with Node and TypeScript
- Writing TypeScript Express.js Code
- Adding REST Routes with TypeScript
- Finishing the REST Routes
- Testing the API
- Using Type Casting
- Moving to a Better Project Structure
- Wrap Up
-
Chapter 34 : An Introduction to Deno
- Module Introduction
- What is Deno?
- Why Deno?
- Deno Setup
- Writing First Deno Code
- The Deno Runtime (Namespace) API
- Using the Runtime API
- Working with Deno Permissions
- Repeating the Example with Node
- How Deno Features Are Organized
- Using the Standard Library
- Creating a Webserver
- Using the Oak Framework with Deno
- An Example Node REST API
- Re-building the REST API with Deno
- Should You Switch from Node to Deno?
- Chapter 35 : Deno, CRUD and Databases (MongoDB)
- Chapter 36 : Roundup
Product information
- Title: Node.js - The Complete Guide
- Author(s):
- Release date: April 2019
- Publisher(s): Packt Publishing
- ISBN: 9781838826864
You might also like
video
Node.js Essentials
6+ Hours of Video Instruction Learn to write performant back-end applications in JavaScript by leveraging the …
video
The Complete Node.js Developer Course (3rd Edition)
This course was just completely re-filmed to give you everything you need to master Node.js in …
video
Node.js API Masterclass with Express and MongoDB
This course will help you to create an extensive, in-depth backend API for DevCamper, a Bootcamp …
book
Node.js: Novice to Ninja
Node.js: Novice to Ninja is your hands-on guide to learning everything needed to build a professional …