About
About Us
Help
Privacy Policy
Terms of Service
LearnDesk
Learn
Academics
Business
Creative
Health and Fitness
Lifestyle
Personal Development
Software
Topics
Admissions
Engineering
Hardware
Hospitality
Humanities
Chinese
Languages
Maths
Pharma
View All Topics
Topics
Accounting
Advertising
Analysis
Analytics
Business Communication
eCommerce
Entrepreneurship
Finance
Finance - India
Freelancing
View All Topics
Topics
Arts & Crafts
Audio Editing
Audio Production
Dance
Design
Film Production
Music
Photography
Video Production
Writing
View All Topics
Topics
Dieting
Fitness
Food Safety
Games
Medical
Medical Professionals
Meditation
Mental Health
Pregnancy
Safety & First Aid
View All Topics
Topics
Beauty & Makeup
Food
Fashion
Gaming
Home Improvement
Parenting
Pet Care & Training
Relationships
Sustainable Living
View All Topics
Topics
Career Development
Learning
Religion and Spirituality
Self-Improvement
View All Topics
Topics
Accounting
Amazon Web Services
App Development
Continuous Integration
Backup Software
Business Automation
Computational Fluid Dynamics
Business Intelligence
Computer Aided Design (CAD)
View All Topics
Teach
Teach Online
Schedule
Items
Billing
Users
Marketing
Analytics
Settings
Change School
Account
Log In
Sign Up
Node.js: The Complete Guide
Introduction
Introduction
What is Node.js?
Installing Node.js and Creating Our First App
Understanding the Role and Usage of Node.js
Course Outline
How to Get the Most Out of the Course
Working with the REPL vs Using Files
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
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
Improved Development Workflow and Debugging
Module Introduction
Understanding NPM Scripts
Installing 3rd Party Packages
Using Nodemon for Autorestarts
Understanding Different Error Types
Finding and Fixing Syntax Errors
Dealing with Runtime Errors
Logical Errors
Using the Debugger
Restarting the Debugger Automatically After Editing Our App
Changing Variables in the Debug Console
Wrap Up
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 Our Pages
Serving Files Statically
Wrap Up
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 Our Project to Handlebars
Adding the Layout to Handlebars
Working with EJS
Working on the Layout with Partials
Wrap Up
The Model View Controller (MVC)
Module Introduction
What is the MVC?
Adding Controllers
Finishing the Controllers
Adding a Product Model
Storing Data in Files via the Model
Fetching Data From Files via the Model
Refactoring the File Storage Code
Wrap Up
Optional: Enhancing the App
Module Introduction
Creating the Shop Structure
Working on the Navigation
Registering the Routes
Storing Product Data
Displaying Product Data
Editing and Deleting Products
Adding Another Item
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 Query Params
Pre-Populating the Edit Product Page with Data
Linking to the Edit Page
Editing the Product Data
Adding the Product-Delete Functionality
Deleting Cart Items
Displaying Cart Items on the Cart Page
Deleting Cart Items
Fixing a Delete Product Bug
Wrap Up
SQL Introduction
Module Introduction
Choosing a Database
NoSQL Introduction
Comparing SQL and NoSQL
Setting Up MySQL
Connecting Our 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" Condition
Wrap Up
Understanding Sequelize
Module Introduction
What is Sequelize?
Connecting to the Database
Defining a Model
Syncing JS Definitions to the Database
Inserting Data and Creating a Product
Retrieving Data and Finding Products
Getting a Single Product with the "where" Condition
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 Cartitems as Orderitems
Resetting the Cart and Fetching and Outputting Orders
Wrap Up
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" and "Delete" Buttons Work Again
Working on the Product Model to Edit Our Product
Finishing the "Update Product" Code
One Note About Updating Products
Deleting Products
Fixing the "Add Product" Functionality
Creating New Users
Storing the User in Our 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
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
One 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
Sessions and Cookies
Module Introduction
What is a Cookie?
The Current Project Status
Optional: Creating the Login Form
Adding the 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
Adding Authentication
Module Introduction
What is Authentication?
How is Authentication Implemented?
Our Updated Project Status
Implementing an Authentication Flow
Encrypting Passwords
Adding a Tiny Code Improvement
Adding the Signin Functionality
Working on Route Protection
Using Middleware to Protect Routes
Understanding CSRF Attacks
Using a CSRF Token
Adding CSRF Protection
Fixing the Order Button
Providing User Feedback
Optional: Styling Error Messages
Finishing the Flash Messages
Adding Additional Flash Messages
Wrap Up
Sending Emails
Module Introduction
How Does Sending Emails Work?
Using SendGrid
Using Nodemailer to Send an Email
Potential Limitation for Large Scale Apps
Advanced Authentication
Module Introduction
Resetting Passwords
Implementing the Token Logic
Creating the Token
Creating the Reset Password Form
Adding Logic to Update the Password
Why We Need Authorization
Adding Authorization
Adding Protection to Post Actions
Why Editing Fails
Wrap Up
Understanding Validation
Module Introduction
Why Should We Use Validation?
How to Validate Input?
Setup and Basic Validation
Using Validation Error Messages
Built-In and 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
Error Handling
Module Introduction
Types of Errors and Error Handling
Analysing the 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
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 Filepath
Filtering Files by Mimetype
Storing File Data in the Database
Serving Images Statically
Downloading Files with Authentication
Setting 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
Adding Pagination
Module Introduction
Adding Pagination Links
Retrieving a Chunk of Data
Preparing Pagination Data on the Server
Adding Dynamic Pagination Buttons
Re-Using the Pagination Logic and Controls
Wrap Up
Understanding Async Requests
Module Introduction
What are Async Requests?
Adding Client Side JS Code
Sending and Handling Background Requests
Manipulating the DOM
Adding Payments
Module Introduction
How Payments Work
Adding a Checkout Page
Using Stripe in Your App
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 CORS Errors
Sending Post Requests
Wrap Up
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
Logging 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
Understanding Async Await in Node.js
Module Introduction
What is Async Await All About?
Transforming "Then Catch" to "Async Await"
Wrap Up
Understanding Web Sockets and Socket.io
Module Introduction
What are Web Sockets 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
Working with GraphQL
Module Introduction
What is GraphQL?
Understanding the Setup and Writing Our First Query
Defining a Mutation Schema
Adding a Mutation Resolver and GraphiQL
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
Deploying Our 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 SSL Server
Using a Hosting Provider
Understanding the Project and the Git Setup
A Deployment Example with Heroku
Deploying APIs
Testing Node.js Applications
Module Introduction
What is Testing?
Why and How?
Setup and Writing a 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
Node.js as a Build Tool and Using npm
Module Introduction
npm and Node.js
Using npm
What is a Build Tool?
Using Node.js in Build Processes
Roundup
Course Roundup
Wrap Up
Node.js: The Complete Guide
Improved Development Workflow and Debugging
By:
Packt Publishing
3 minutes
Share
Share the link to this page
Copied
Facebook
Twitter
WhatsApp
LinkedIn
Email
Add to Calendar
Add the class to your calendar
Add to Google Calendar
Add to Apple Calendar
Add to Yahoo Calendar
Add to Outlook Calendar
Print
Completed
You need to have access to the item to view this lesson.
One-time Fee
R2,638.99
Buy Class
₹12,889.99
Buy Class
₨12,889.99
Buy Class
$186.99
Buy Class
€177.72
Buy Class
£148.02
Buy Class
CA$261.21
Buy Class
A$287.15
Buy Class
S$251.33
Buy Class
HK$1,455.35
Buy Class
CHF 165.25
Buy Class
NOK kr2,066.84
Buy Class
DKK kr1,325.66
Buy Class
NZ$318.76
Buy Class
د.إ686.81
Buy Class
৳22,364.40
Buy Class
RM834.91
Buy Class
₦314,253.52
Buy Class
฿6,482.75
Buy Class
₺6,460.84
Buy Class
B$1,086.50
Buy Class
Лв347.56
Buy Class
₩262,012.06
Buy Class
₪698.31
Buy Class
₱11,044.37
Buy Class
¥28,871.74
Buy Class
MX$3,804.22
Buy Class
QR682.45
Buy Class
P2,556.64
Buy Class
KSh24,168.45
Buy Class
E£9,284.16
Buy Class
ብር23,333.02
Buy Class
Kz170,596.08
Buy Class
CLP$182,094.60
Buy Class
CN¥1,354.12
Buy Class
RD$11,287.53
Buy Class
DA24,979.95
Buy Class
FJ$424.50
Buy Class
Q1,444.74
Buy Class
GY$39,154.09
Buy Class
ISK kr25,860.71
Buy Class
DH1,869.58
Buy Class
L3,405.09
Buy Class
ден10,936.41
Buy Class
MOP$1,500.43
Buy Class
N$3,394.41
Buy Class
C$6,886.74
Buy Class
रु25,260.79
Buy Class
S/710.20
Buy Class
K753.38
Buy Class
SAR702
Buy Class
ZK5,179.24
Buy Class
L884.44
Buy Class
Kč4,502.90
Buy Class
Ft73,081.09
Buy Class
SEK kr2,062.52
Buy Class
ARS$187,500.83
Buy Class
Bs1,295.97
Buy Class
COP$825,294.27
Buy Class
₡95,037.94
Buy Class
L4,729.20
Buy Class
₲1,465,649.52
Buy Class
$U8,000.33
Buy Class
zł772.71
Buy Class
Already have an account?
Log In
Previous
Next
Sign Up
Signup to access thousands of classes
Continue with Facebook
Continue with Google
OR
Continue with Email
Already a member?
Log In
By registering for a LearnDesk account, you agree to our
Terms of Service
and
Privacy Policy
.
Share
Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.
Share with Google Contacts