NodeJS - The Complete Guide (MVC, REST APIs, GraphQL, Deno)
Master Node JS, build REST APIs with Node.js, GraphQL APIs, add Authentication, use MongoDB, SQL & much more!
About This Course
Welcome to "NodeJS - The Complete Guide"!
Node.js is probably THE most popular and modern server-side programming language you can dive into these days! Join this comprehensive course and master Node.js from scratch.
Node.js developers are in high demand and the language is used for everything from traditional web apps with server-side rendered views over REST APIs all the way up to GraphQL APIs and real-time web services. Not to mention its applications in build workflows for projects of all sizes.
This course will teach you all of that! From scratch with zero prior knowledge assumed. Though if you do bring some knowledge, you'll of course be able to quickly jump into the course modules that are most interesting to you.
We'll not just walk through boring theory and some slides. Instead, we'll build two major projects: An online shop (including checkout + payments) and a blog. All topics and features will be shown in these realistic environments.
Why Learn Node.js?
Node.js lets you build powerful server-side applications using JavaScript! My goal is to ensure that you feel confident building web applications and APIs with Node.js, so that you can create your own projects, enhance your existing applications, or boost your portfolio as a backend developer - whatever your goal is: This course gets you there!
What's in This Course?
The course will start at the very basics and teach you Node.js step-by-step, from the ground up. You'll learn about all core concepts, essential modules and also many crucial advanced features.
Node.js Fundamentals
A thorough introduction to Node.js and its core modules. Learn to parse requests, send responses and render HTML dynamically on the server.
Express.js & MVC
Master the Express.js framework and the Model-View-Controller (MVC) pattern. Work with files, generate PDFs on-the-fly and handle file uploads and downloads.
Databases & Authentication
Work with SQL (MySQL + Sequelize) and NoSQL (MongoDB + Mongoose). Implement sessions, cookies, user authentication and authorization.
REST & GraphQL APIs
Build REST APIs and GraphQL APIs with authentication and file uploads. Create real-time applications with Websockets.
In Detail, You'll Learn
This course covers everything you need to master Node.js with two major realistic projects where all concepts are applied step-by-step.
Core Concepts
Master these essential Node.js skills:
- Node.js basics & basic core modules
- Parsing requests & sending responses
- Rendering HTML dynamically (on the server)
- Using Express.js & the MVC pattern
- Working with files & generating PDFs
- Sessions, cookies & user authentication
Advanced Topics
Take your skills to the next level:
- SQL (MySQL + Sequelize) & NoSQL (MongoDB + Mongoose)
- Building REST APIs & GraphQL APIs
- Authentication in REST & GraphQL APIs
- Real-time apps with Websockets
- Handling payments with Stripe.js
- Automated testing & deployment
Build Two Major Real-World Projects!
You'll learn Node.js not only in theory but by building two major projects: An online shop (including checkout + payments) and a blog. This allows you to apply what you learned in realistic environments. By the end of the course, you'll be able to build and deploy your own Node.js applications!
No Prior Node.js Knowledge Required
See The Course In Action
Curriculum
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
Course Prerequisites
Here's what you need to get the most out of this course
- Basic JavaScript knowledge is strongly recommended but could be picked up whilst going through the course.
- General knowledge of how the web works is recommended but not a must-have.
- NO NodeJS knowledge is required!
All pre-requisites are covered by courses in our "Academind Pro" Membership.
Your Instructor
Maximilian Schwarzmüller
Founder & Instructor
Self-taught developer with 3,500,000+ students and 900,000 YouTube subscribers. I co-founded Academind with Manuel Lorenz to help people master new skills and build amazing projects.
Join 10750 happy students!
Choose the plan that works best for you
Single-Course License
Full access to "NodeJS - The Complete Guide (MVC, REST APIs, GraphQL, Deno)"
This is a one-time payment that grants access to this course only, not to any other courses.
Academind Pro Membership
Unlimited access to this and all other current & future courses!
This is a recurring payment. You can cancel anytime from your profile. For more info, contact Academind.
Continue Your Learning Journey
Expand your skills with these hand-picked courses that complement what you'll learn here.