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
One-To-Many and Many-To-Many Relations
Node.js: The Complete Guide
Understanding Sequelize
By:
Packt Publishing
6 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
€171.95
Buy Class
£144.63
Buy Class
CA$261.17
Buy Class
A$285.04
Buy Class
S$247.94
Buy Class
HK$1,454.49
Buy Class
CHF 161.61
Buy Class
NOK kr2,055.48
Buy Class
DKK kr1,287.29
Buy Class
NZ$313.61
Buy Class
د.إ686.81
Buy Class
৳22,317.13
Buy Class
RM818.73
Buy Class
₦306,891.95
Buy Class
฿6,304.76
Buy Class
₺6,418.71
Buy Class
B$1,097.51
Buy Class
Лв337.09
Buy Class
₩258,109.77
Buy Class
₪700.15
Buy Class
₱10,913.67
Buy Class
¥28,614.14
Buy Class
MX$3,792.66
Buy Class
QR680.82
Buy Class
P2,496.69
Buy Class
KSh24,092.26
Buy Class
E£9,110.38
Buy Class
ብር22,429.19
Buy Class
Kz170,441.38
Buy Class
CLP$179,562.98
Buy Class
CN¥1,331.85
Buy Class
RD$11,238.47
Buy Class
DA24,842.20
Buy Class
FJ$420.87
Buy Class
Q1,442.95
Buy Class
GY$39,054.55
Buy Class
ISK kr25,621.66
Buy Class
DH1,835.41
Buy Class
L3,330.50
Buy Class
ден10,588.05
Buy Class
MOP$1,496.04
Buy Class
N$3,287.01
Buy Class
C$6,871.96
Buy Class
रु25,131.90
Buy Class
S/704.91
Buy Class
K748.54
Buy Class
SAR700.73
Buy Class
ZK5,013.28
Buy Class
L858.35
Buy Class
Kč4,373.41
Buy Class
Ft70,171.80
Buy Class
SEK kr1,982.21
Buy Class
ARS$184,937.12
Buy Class
Bs1,295.17
Buy Class
COP$826,234.07
Buy Class
₡95,767.65
Buy Class
L4,707.78
Buy Class
₲1,475,432.41
Buy Class
$U7,790.72
Buy Class
zł752.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