Autoplay
Autocomplete
Previous Lesson
Complete and Continue
NodeJS - The Complete Guide (MVC, REST APIs, GraphQL, Deno)
Getting Started
Introduction (1:55)
What is Node.js? (4:42)
Installing Node.js and Creating our First App (7:41)
Join our Online Learning Community
Understanding the Role & Usage of Node.js (7:32)
Course Outline (7:31)
How To Get The Most Out Of The Course (3:54)
Working with the REPL vs Using FIles (2:58)
Using the Attached Source Code
The Academind Pro Referral Program
Optional: JavaScript - A Quick Refresher
Module Introduction (1:36)
JavaScript in a Nutshell (2:35)
Refreshing the Core Syntax (4:34)
let & const (2:27)
Understanding Arrow Functions (5:17)
Working with Objects, Properties & Methods (3:19)
Arrays & Array Methods (4:16)
Arrays, Objects & Reference Types (2:13)
Understanding Spread & Rest Operators (6:40)
Destructuring (5:37)
Async Code & Promises (10:28)
Template Literals
Wrap Up (0:50)
Useful Resources & Links
Understanding the Basics
Module Introduction (1:50)
How The Web Works (4:11)
Creating a Node Server (13:22)
The Node Lifecycle & Event Loop (4:53)
Understanding Requests (3:10)
Sending Responses (5:37)
Controlling the Node.js Process
Routing Requests (5:48)
Redirecting Requests (4:10)
Parsing Request Bodies (11:12)
Understanding Event Driven Code Execution (6:00)
Blocking and Non-Blocking Code (5:04)
Node.js - Looking Behind the Scenes (12:01)
Using the Node Modules System (10:05)
Wrap Up (5:15)
Assignment - Basics (Problem) (2:32)
Assignment - Basics (Solution) (11:32)
Useful Resources & Links
Improved Development Workflow and Debugging
Module Introduction (0:40)
Understanding NPM Scripts (7:03)
Installing 3rd Party Packages (8:20)
Global Features vs Core Modules vs Third-Party Modules
Using Nodemon for Autorestarts (1:36)
Global & Local npmPackages
Understanding different Error Types (1:49)
Finding & Fixing Syntax Errors (3:10)
Dealing with Runtime Errors (2:47)
Logical Errors (6:32)
Using the Debugger (3:10)
Restarting the Debugger Automatically After Editing our App (6:21)
Changing Variables in the Debug Console (1:26)
Wrap Up (3:14)
Useful Resources & Links
Working with Express.js
Module Introduction (2:15)
What is Express.js? (3:43)
Installing Express.js (3:47)
Adding Middleware (5:13)
How Middleware Works (2:58)
Express.js - Looking Behind the Scenes (3:42)
Handling Different Routes (4:59)
Assignment - Express.js (Problem) (1:52)
Assignment - Express.js (Solution) (6:21)
Parsing Incoming Requests (8:00)
Limiting Middleware Execution to POST Requests (1:48)
Using Express Router (8:04)
Adding a 404 Error Page (2:30)
Filtering Paths (3:38)
Creating HTML Pages (5:09)
Serving HTML Pages (7:19)
Returning a 404 Page (2:00)
Using a Helper Function for Navigation (3:37)
Styling our Pages (13:58)
Serving Files Statically (7:49)
Assignment - Navigation (Problem) (1:11)
Assignment - Navigation (Solution) (8:32)
Wrap Up (3:36)
Useful Resources & Links
Working with Dynamic Content & Adding Templating Engines
Module Introduction (2:31)
Sharing Data Across Requests & Users (8:05)
Templating Engines - An Overview (4:40)
Installing & Implementing Pug (11:04)
Outputting Dynamic Content (11:02)
Converting HTML Files to Pug (5:55)
Adding a Layout (5:35)
Finishing the Pug Template (5:50)
Working with Handlebars (5:08)
Converting our Project to Handlebars (7:41)
Adding the Layout to Handlebars (8:41)
Working with EJS (8:19)
Working on the Layout with Partials (9:33)
Wrap Up (3:46)
Assignment - Templating Engines (Problem) (1:36)
Assignment - Templating Engines (Solution) (25:02)
Useful Resources & Links
The Model View Controller (MVC)
Module Introduction (0:52)
What is the MVC? (2:48)
Adding Controllers (9:20)
Finishing the Controllers (2:37)
Adding a Product Model (8:05)
Storing Data in Files Via the Model (9:39)
Fetching Data from Files Via the Model (3:55)
Refactoring the File Storage Code (4:25)
Wrap Up (2:15)
Useful Resources & Links
Optional: Enhancing the App
Module Introduction (1:21)
Creating the Shop Structure (5:34)
Working on the Navigation (2:49)
Registering the Routes (11:04)
Storing Product Data (5:15)
Displaying Product Data (3:02)
Editing & Deleting Products (4:47)
Adding Another Item (2:08)
Useful Resources & Links
Dynamic Routes & Advanced Models
Module Introduction (1:07)
Preparations (1:23)
Adding the Product ID to the Path (4:34)
Extracting Dynamic Params (4:32)
Loading Product Detail Data (4:52)
Rendering the Product Detail View (5:26)
Passing Data with POST Requests (7:19)
Adding a Cart Model (12:29)
Using Query Params (7:54)
Pre-Populating the Edit Product Page with Data (6:46)
Linking to the Edit Page (2:20)
Editing the Product Data (8:58)
Adding the Product-Delete Functionality (5:34)
Deleting Cart Items (8:11)
Displaying Cart Items on the Cart Page (8:45)
Deleting Cart Items (5:24)
Fixing a Delete Product Bug (1:31)
Wrap Up (1:46)
Useful Resources & Links
SQL Introduction
Module Introduction (1:33)
Choosing a Database (4:17)
NoSQL Introduction (4:20)
Comparing SQL and NoSQL (5:06)
Setting Up MySQL (7:16)
Connecting our App to the SQL Database (6:50)
Basic SQL & Creating a Table (4:07)
Retrieving Data (3:00)
Fetching Products (6:30)
Fetching Products - Time to Practice (1:04)
Inserting Data Into the Database (4:12)
Fetching a Single Product with the "where" Condition (2:57)
Wrap Up (1:24)
Useful Resources & Links
Understanding Sequelize
Module Introduction (1:26)
What is Sequelize? (2:35)
Connecting to the Database (3:57)
Defining a Model (5:47)
Syncing JS Definitions to the Database (4:29)
Inserting Data & Creating a Product (4:49)
Retrieving Data & Finding Products (3:01)
Getting a Single Product with the "where" Condition (4:30)
Fetching Admin Products (1:25)
Updating Products (5:18)
Deleting Products (2:48)
Creating a User Model (2:48)
Adding a One-To-Many Relationship (5:54)
Creating & Managing a Dummy User (6:01)
Using Magic Association Methods (3:42)
Fetching Related Products (2:46)
One-To-Many & Many-To-Many Relations (6:03)
Creating & Fetching a Cart (5:45)
Adding New Products to the Cart (6:42)
Adding Existing Products & Retrieving Cart Items (4:55)
Deleting Related Items & Deleting Cart Products (2:24)
Adding an Order Model (4:19)
Storing Cartitems as Orderitems (8:19)
Resetting the Cart & Fetching and Outputting Orders (9:53)
Wrap Up (1:49)
Useful Resources & Links
Working with NoSQL & Using MongoDB
Module Introduction (1:17)
What is MongoDB? (3:57)
Relations in NoSQL (3:58)
Setting Up MongoDB (4:48)
Installing the MongoDB Driver (7:01)
Creating the Database Connection (3:25)
Finishing the Database Connection (4:21)
Using the Database Connection (5:14)
Creating Products (2:08)
Understanding the MongoDB Compass (2:38)
Fetching All Products (4:34)
Fetching a Single Product (7:45)
Making the "Edit" & "Delete" Buttons Work Again (2:21)
Working on the Product Model to Edit our Product (7:14)
Finishing the "Update Product" Code (3:57)
One Note About Updating Products (1:46)
Deleting Products (3:30)
Fixing the "Add Product" Functionality (1:28)
Creating New Users (7:00)
Storing the User in our Database (5:40)
Working on Cart Items & Orders (7:13)
Adding the "Add to Cart" Functionality (6:14)
Storing Multiple Products in the Cart (7:01)
Displaying the Cart Items (9:20)
Fixing a Bug (1:02)
Deleting Cart Items (4:02)
Adding an Order (4:36)
Adding Relational Order Data (6:21)
Getting Orders (3:20)
Removing Deleted Items From the Cart (2:58)
Wrap Up (2:19)
Useful Resources & Links
Working with Mongoose
Module Introduction (1:23)
What is Mongoose? (2:04)
Connecting to the MongoDB Server with Mongoose (4:47)
Creating the Product Schema (6:01)
Saving Data Through Mongoose (6:10)
Fetching All Products (2:27)
Fetching a Single Product (1:24)
Updating Products (4:14)
Deleting Products (1:19)
Adding and Using a User Model (6:36)
Using Relations in Mongoose (3:44)
One Important Thing About Fetching Relations (3:53)
Working on the Shopping Cart (5:25)
Loading the Cart (5:12)
Deleting Cart Items (2:45)
Creating & Getting Orders (9:56)
Storing All Order Related Data (1:52)
Clearing the Cart After Storing an Order (1:59)
Getting & Displaying the Orders (3:40)
Wrap Up (1:37)
Useful Resources & Links
Sessions & Cookies
Module Introduction (0:45)
What is a Cookie? (1:58)
The Current Project Status (2:18)
Optional: Creating the Login Form (6:22)
Adding the Request Driven Login Solution (7:40)
Setting a Cookie (5:55)
Manipulating Cookies (1:58)
Configuring Cookies (5:43)
What is a Session? (2:58)
Initializing the Session Middleware (2:43)
Using the Session Middleware (4:14)
Using MongoDB to Store Sessions (5:59)
Sessions & Cookies - A Short Summary (1:53)
Assignment - Sessions & Cookies (Problem) (1:37)
Assignment - Sessions & Cookies (Solution) (7:24)
Deleting a Cookie (4:35)
Fixing Some Minor Bugs (4:27)
Making "Add to Cart" Work Again (6:45)
Two Tiny Improvements (3:11)
Wrap Up (3:43)
Useful Resources & Links
Adding Authentication
Module Introduction (1:22)
What is Authentication? (2:25)
How is Authentication Implemented? (2:05)
Our Updated Project Status (2:25)
Implementing an Authentication Flow (7:34)
Encrypting Passwords (4:36)
Adding a Tiny Code Improvement (1:21)
Adding the Signin Functionality (6:21)
Working on Route Protection (2:12)
Using Middleware to Protect Routes (4:38)
Understanding CSRF Attacks (3:23)
Using a CSRF Token (6:56)
Adding CSRF Protection (4:23)
Fixing the Order Button (1:16)
Providing User Feedback (7:10)
Optional: Styling Error Messages (3:32)
Finishing the Flash Messages (2:20)
Adding Additional Flash Messages (2:20)
Wrap Up (2:32)
Useful Resources & Links
Sending Emails
Module Introduction (0:46)
How Does Sending Emails Work? (1:33)
Using SendGrid (1:24)
Using Nodemailer to Send an Email (5:09)
Potential Limitation for Large Scale Apps (1:29)
Useful Resources & Links
Advanced Authentication
Module Introduction (0:42)
Resetting Passwords (3:03)
Implementing the Token Logic (7:41)
Creating the Token (1:27)
Creating the Reset Password Form (5:27)
Adding Logic to Update the Password (6:35)
Why we Need Authorization (1:58)
Adding Authorization (2:07)
Adding Protection to Post Actions (3:43)
Why Editing Fails (1:06)
Wrap Up (1:44)
Useful Resources & Links
Understanding Validation
Module Introduction (1:03)
Why Should We Use Validation? (2:28)
How to Validate Input? (4:04)
Setup & Basic Validation (10:44)
Using Validation Error Messages (2:11)
Built-In & Custom Validators (3:55)
More Validators (4:26)
Checking For Field Equality (3:14)
Adding Async Validation (4:46)
Assignment - Validation (Problem) (1:18)
Assignment - Validation (Solution) (4:45)
Keeping User Input (4:11)
Adding Conditional CSS Classes (5:29)
Adding Validation to Login (5:36)
Sanitizing Data (3:41)
Validating Product Addition (11:40)
Validating Product Editing (6:57)
Wrap Up (1:23)
Useful Resources & Links
Error Handling
Module Introduction (0:45)
Types of Errors & Error Handling (5:14)
Analyzing the Error Handling in the Current Project (2:22)
Errors - Some Theory (6:43)
Throwing Errors in Code (2:42)
Returning Error Pages (6:54)
Using the Express.js Error Handling Middleware (5:47)
Updating the App (3:09)
Using the Error Handling Middleware Correctly (4:54)
Status Codes (5:57)
Wrap Up (2:21)
Useful Resources & Links
File Upload & Download
Module Introduction (0:54)
Adding a File Picker to the Frontend (3:06)
Handling Multipart Form Data (5:15)
Handling File Uploads with Multer (4:51)
Configuring Multer to Adjust Filename & Filepath (4:29)
Filtering Files by Mimetype (2:28)
Storing File Data in the Database (7:42)
Serving Images Statically (4:25)
Downloading Files with Authentication (7:33)
Setting File Type Headers (2:35)
Restricting File Access (3:19)
Streaming Data vs Preloading Data (3:20)
Using PDFKit for .pdf Generation (5:32)
Generating .pdf Files with Order Data (6:50)
Deleting Files (5:57)
Fixing Invoice Links (0:35)
Wrap Up (1:31)
Useful Resources & Links
Adding Pagination
Module Introduction (0:48)
Adding Pagination Links (4:08)
Retrieving a Chunk of Data (3:47)
Preparing Pagination Data on the Server (3:52)
Adding Dynamic Pagination Buttons (8:07)
Re-Using the Pagination Logic & Controls (3:41)
Wrap Up (1:02)
Useful Resources & Links
Understanding Async Requests
Module Introduction (0:49)
What are Async Requests? (2:07)
Adding Client Side JS Code (7:24)
Sending & Handling Background Requests (9:26)
Manipulating the DOM (3:01)
Useful Resources & Links
Adding Payments
Module Introduction (0:58)
How Payments Work (2:04)
Adding a Checkout Page (6:00)
Using Stripe in Your App (19:23)
Useful Resources & Links
Working with REST APIs - The Basics
Module Introduction (1:25)
What are REST APIs and why do we use Them? (7:01)
Accessing Data with REST APIs (5:41)
Understanding Routing & HTTP Methods (5:25)
REST APIs - The Core Principles (4:09)
Creating our REST API Project & Implementing the Route Setup (6:41)
Sending Requests & Responses and Working with Postman (13:28)
REST APIs, Clients & CORS Errors (10:33)
Sending POST Requests (6:32)
Wrap Up (2:14)
Useful Resources & Links
Working with REST APIs - The Practical Application
Module Introduction (1:10)
REST APIs & The Rest Of The Course (3:59)
Understanding the Frontend Setup (4:18)
Planning the API (3:02)
Fetching Lists of Posts (6:19)
Adding a Create Post Endpoint (7:36)
Adding Server Side Validation (6:19)
Setting Up a Post Model (5:14)
Storing Posts in the Database (3:32)
Static Images & Error Handling (6:53)
Fetching a Single Post (7:48)
Uploading Images (8:56)
Updating Posts (14:02)
Deleting Posts (4:17)
Adding Pagination (6:20)
Adding a User Model (4:08)
Adding User Signup Validation (6:29)
Signing Users Up (7:24)
How Does Authentication Work? (3:10)
Starting with User Login (3:51)
Logging In & Creating JSON Web Tokens (JWTs) (7:53)
Using & Validating the Token (9:43)
Adding Auth Middleware to All Routes (1:52)
Connecting Posts & Users (6:13)
Adding Authorization Checks (3:50)
Clearing Post-User Relations (2:54)
Assignment - REST API (Problem) (0:59)
Assignment - REST API (Solution) (8:16)
Wrap Up (2:28)
Useful Resources & Links
Understanding Async Await in Node.js
Module Introduction (0:58)
What is Async Await All About? (4:08)
Transforming "Then Catch" to "Async Await" (4:26)
Assignment - Async Await (Problem) (0:39)
Assignment - Async Await (Solution) (9:56)
Wrap Up (3:03)
Useful Resources & Links
Understanding Websockets & Socket.io
Module Introduction (0:55)
What Are Websockets & Why Would You Use Them? (4:17)
Websocket Solutions - An Overview (1:35)
Setting Up Socket.io on the Server (3:56)
Establishing a Connection From the Client (2:27)
Identifying Realtime Potential (2:42)
Sharing the IO Instance Across Files (2:46)
Synchronizing POST Additions (7:14)
Fixing a Bug - The Missing Username (1:44)
Updating Posts On All Connected Clients (3:58)
Sorting Correctly (0:59)
Deleting Posts Across Clients (2:31)
Wrap Up (1:48)
Useful Resources & Links
Working with GraphQL
Module Introduction (0:57)
What is GraphQL? (9:17)
Understanding the Setup & Writing our First Query (11:15)
Defining a Mutation Schema (5:42)
Adding a Mutation Resolver & GraphiQL (9:42)
Adding Input Validation (4:19)
Handling Errors (3:45)
Connecting the Frontend to the GraphQL API (6:49)
Adding a Login Query & a Resolver (6:20)
Adding Login Functionality (4:57)
Adding a Create Post Mutation (7:23)
Extracting User Data From the Auth Token (5:48)
Sending the "Create Post" Query (4:46)
Fixing a Bug & Adding New Posts Correctly (2:53)
Adding a "Get Post" Query & Resolver (4:53)
Sending "Create Post" and "Get Post" Queries (5:13)
Adding Pagination (4:28)
Uploading Images (10:26)
Viewing a Single Post (6:07)
Updating Posts (9:32)
Deleting Posts (9:25)
Managing the User Status (9:17)
Using Variables (16:06)
Fixing a Pagination Bug (2:48)
Wrap Up (3:36)
Useful Resources & Links
Deploying our App
Module Introduction (1:16)
Deploying Different Kinds of Apps (1:39)
Deployment Preparations (4:52)
Using Environment Variables (11:12)
Using Production API Keys (1:19)
Setting Secure Response Headers with Helmet (2:40)
Compressing Assets (2:33)
Setting Up Request Logging (3:34)
Setting Up a SSL Server (9:55)
Using a Hosting Provider (4:25)
Understanding the Project & the Git Setup (4:03)
A Deployment Example with Heroku (10:26)
Deploying APIs (2:52)
Useful Resources & Links
Testing Node.js Applications
Module Introduction (0:43)
What is Testing? (2:42)
Why & How? (3:25)
Setup and Writing a First Test (9:40)
Testing the Auth Middleware (12:33)
Organizing Multiple Tests (4:12)
What Not To Test! (8:02)
Using Stubs (8:38)
Testing Controllers (8:03)
Testing Asynchronous Code (5:53)
Setting up a Testing Database (6:33)
Testing Code With An Active Database (6:33)
Cleaning Up (3:29)
Hooks (4:34)
Testing Code That Requires Authentication (12:37)
Wrap Up & Mastering Tests (4:22)
Useful Resources & Links
New Lecture
Node.js as a Build Tool & Using npm
Module Introduction (1:01)
npm & Node.js (1:42)
Using npm (7:52)
What is a Build Tool? (5:01)
Using Node.js in Build Processes (5:50)
Useful Resources & Links
Modern JavaScript & NodeJS
Module Introduction (2:28)
What is this Module About? (2:19)
Using ES Modules (9:32)
More on ES Modules (6:26)
Node Core Modules & Promises (5:18)
Module Resources
Bonus: Node & TypeScript
Module Introduction (1:22)
TypeScript: What & Why (6:02)
TypeScript Setup (4:09)
Assigning Types (3:29)
Type Inference & Type Casting (6:10)
Configuring TypeScript (5:01)
Working with Union Types (4:23)
Using Object and Array Types (6:17)
Type Aliases & Interfaces (3:22)
Understanding Generic Types (5:09)
TypeScript: A Summary (0:34)
TypeScript & Node: Setup (2:14)
Getting Started with TypeScript & Node (9:31)
Writing TypeScript Express.js Code (3:59)
Adding REST Routes with TS (6:42)
Finishing the REST Routes (5:53)
Testing the API (4:52)
Using Type Casting (4:21)
Moving to a Better Project Structure (3:44)
Wrap Up (2:50)
Module Resources
DenoJS - An Introduction
Module Introduction (1:35)
What is Deno? (3:09)
Why Deno? (1:55)
Deno Setup (5:50)
Writing First Deno Code (4:18)
The Deno Runtime (Namespace) API (3:13)
Using the Runtime API (5:26)
Working with Deno Permissions (4:31)
Repeating the Example with Node (4:16)
How Deno Features Are Organized (4:28)
Using the Standard Library Modules (8:30)
Creating a Webserver (2:54)
Using the Oak Framework with Deno (9:48)
More on Module URLs
Creating an Example Node REST API (12:15)
Re-building the REST API with Deno (16:18)
Should You Switch From Node To Deno? (5:05)
Module Resources
Deno & MongoDB
Module Introduction (1:00)
App Setup (4:06)
Deno & CORS (7:16)
Establishing a MongoDB Connection (8:05)
Using the Mongo Module (10:34)
Finishing the CRUD Operations (5:29)
Wrap Up (1:10)
Module Resources
Roundup
Course Roundup (2:40)
Storing Posts in the Database
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock