NodeJS – The Complete Guide (incl. Deno, REST APIs, GraphQL)

NodeJS – The Complete Guide (incl. Deno, REST APIs, GraphQL)
NodeJS – The Complete Guide (incl. Deno, REST APIs, GraphQL)

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 40h 27m | 18.9 GB
eLearning | Skill level: All Levels


Master Node JS & Deno.js, build REST APIs with Node.js, GraphQL APIs, add Authentication, use MongoDB, SQL & much more!

Join the most comprehensive Node.js course on Udemy and learn Node in both a practical as well as theory-based way!

This course was updated to also include sections on Deno.js.

Node.js is probably THE most popular and modern server-side programming language you can dive into these days!

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.

Here’s what you’ll learn in this course:

  • Node.js Basics & Basic Core Modules
  • Parsing Requests & Sending Responses
  • Rendering HTML Dynamically (on the Server)
  • Using Express.js
  • Working with Files and generating PDFs on the Server (on-the-fly)
  • File Up- and Download
  • Using the Model-View-Controller (MVC) Pattern
  • Using Node.js with SQL (MySQL) and Sequelize
  • Using Node.js with NoSQL (MongoDB) and Mongoose
  • Working with Sessions & Cookies
  • User Authentication and Authorization
  • Sending E-Mails
  • Validating User Input
  • Data Pagination
  • Handling Payments with Stripe.js
  • Building REST APIs
  • Authentication in REST APIs
  • File Upload in REST APIs
  • Building GraphQL APIs
  • Authentication in GraphQL APIs
  • File Upload in GraphQL APIs
  • Building a Realtime Node.js App with Websockets
  • Automated Testing (Unit Tests)
  • Deploying a Node.js Application
  • Using TypeScript with Node.js
  • Exploring Deno.js
  • And Way More!

Does this look like a lot of content? It certainly is!

This is not a short course but it is the “Complete Guide” on Node.js after all. We’ll dive into a lot of topics and we’ll not just scratch the surface.

We’ll also 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 of the course will be shown and used in these projects and you’ll therefore learn about them in a realistic environment.

What you’ll learn

  • Work with one of the most in-demand web development programming languages
  • Learn the basics as well as advanced concepts of NodeJS in great detail
  • Build modern, fast and scalable server-side web applications with NodeJS, databases like SQL or MongoDB and more
  • Understand the NodeJS ecosystem and build server-side rendered apps, REST APIs and GraphQL APIs
  • Get a thorough introduction to DenoJS
+ Table of Contents

Introduction
1 Introduction
2 Using the Attached Source Code
3 What is Node.js
4 Join our Online Learning Community
5 Node.js Download
6 Installing Node.js and Creating our First App
7 Understanding the Role & Usage of Node.js
8 Course Outline
9 How To Get The Most Out Of The Course
10 Working with the REPL vs Using Files

Optional JavaScript – A Quick Refresher
11 Module Introduction
12 Destructuring
13 Async Code & Promises
14 Template Literals
15 Wrap Up
16 Useful Resources & Links
17 JavaScript in a Nutshell
18 Refreshing the Core Syntax
19 let & const
20 Understanding Arrow Functions
21 Working with Objects, Properties & Methods
22 Arrays & Array Methods
23 Arrays, Objects & Reference Types
24 Understanding Spread & Rest Operators

Understanding the Basics
25 Module Introduction
26 Redirecting Requests
27 Parsing Request Bodies
28 Understanding Event Driven Code Execution
29 Blocking and Non-Blocking Code
30 Node.js – Looking Behind the Scenes
31 Using the Node Modules System
32 Wrap Up
33 Useful Resources & Links
34 How The Web Works
35 Creating a Node Server
36 The Node Lifecycle & Event Loop
37 Controlling the Node.js Process
38 Understanding Requests
39 Sending Responses
40 Request & Response Headers
41 Routing Requests

Improved Development Workflow and Debugging
42 Module Introduction
43 Logical Errors
44 Using the Debugger
45 Restarting the Debugger Automatically After Editing our App
46 Debugging Node.js in Visual Studio Code
47 Changing Variables in the Debug Console
48 Wrap Up
49 Useful Resources & Links
50 Understanding NPM Scripts
51 Installing 3rd Party Packages
52 Global Features vs Core Modules vs Third-Party Modules
53 Using Nodemon for Autorestarts
54 Global & Local npm Packages
55 Understanding different Error Types
56 Finding & Fixing Syntax Errors
57 Dealing with Runtime Errors

Working with Express.js
58 Module Introduction
59 Limiting Middleware Execution to POST Requests
60 Using Express Router
61 Adding a 404 Error Page
62 Filtering Paths
63 Creating HTML Pages
64 Serving HTML Pages
65 Returning a 404 Page
66 Using a Helper Function for Navigation
67 Styling our Pages
68 Serving Files Statically
69 What is Express.js
70 Wrap Up
71 Useful Resources & Links
72 Installing Express.js
73 Adding Middleware
74 How Middleware Works
75 Express.js – Looking Behind the Scenes
76 Handling Different Routes
77 Parsing Incoming Requests

Working with Dynamic Content & Adding Templating Engines
78 Module Introduction
79 Avoiding an Error
80 Working with Handlebars
81 Converting our Project to Handlebars
82 Adding the Layout to Handlebars
83 Working with EJS
84 Working on the Layout with Partials
85 Wrap Up
86 [OPTIONAL] Assignment Solution
87 Useful Resources & Links
88 Sharing Data Across Requests & Users
89 Templating Engines – An Overview
90 Installing & Implementing Pug
91 Outputting Dynamic Content
92 Official Pug Docs
93 Converting HTML Files to Pug
94 Adding a Layout
95 Finishing the Pug Template

The Model View Controller (MVC)
96 Module Introduction
97 Useful Resources & Links
98 What is the MVC
99 Adding Controllers
100 Finishing the Controllers
101 Adding a Product Model
102 Storing Data in Files Via the Model
103 Fetching Data from Files Via the Model
104 Refactoring the File Storage Code
105 Wrap Up

Optional Enhancing the App
106 Module Introduction
107 Creating the Shop Structure
108 Working on the Navigation
109 Registering the Routes
110 Storing Product Data
111 Displaying Product Data
112 Editing & Deleting Products
113 Adding Another Item
114 Useful Resources & Links

Dynamic Routes & Advanced Models
115 Module Introduction
116 Using Query Params
117 Pre-Populating the Edit Product Page with Data
118 Linking to the Edit Page
119 Editing the Product Data
120 Adding the Product-Delete Functionality
121 Deleting Cart Items
122 Displaying Cart Items on the Cart Page
123 Deleting Cart Items
124 Fixing a Delete Product Bug
125 Wrap Up
126 Preparations
127 Useful Resources & Links
128 Applied Changes
129 Adding the Product ID to the Path
130 Extracting Dynamic Params
131 Loading Product Detail Data
132 Rendering the Product Detail View
133 Passing Data with POST Requests
134 Adding a Cart Model

SQL Introduction
135 Module Introduction
136 Fetching Products – Time to Practice
137 Inserting Data Into the Database
138 Fetching a Single Product with the where Condition
139 Wrap Up
140 Useful Resources & Links
141 Choosing a Database
142 NoSQL Introduction
143 Comparing SQL and NoSQL
144 Setting Up MySQL
145 Connecting our App to the SQL Database
146 Basic SQL & Creating a Table
147 Retrieving Data
148 Fetching Products

Understanding Sequelize
149 Module Introduction
150 Fetching Admin Products
151 Updating Products
152 Deleting Products
153 Creating a User Model
154 Adding a One-To-Many Relationship
155 Creating & Managing a Dummy User
156 Using Magic Association Methods
157 Fetching Related Products
158 One-To-Many & Many-To-Many Relations
159 Creating & Fetching a Cart
160 What is Sequelize
161 Adding New Products to the Cart
162 Adding Existing Products & Retrieving Cart Items
163 Deleting Related Items & Deleting Cart Products
164 Adding an Order Model
165 Storing Cartitems as Orderitems
166 Resetting the Cart & Fetching and Outputting Orders
167 Wrap Up
168 Useful Resources & Links
169 Connecting to the Database
170 Defining a Model
171 Syncing JS Definitions to the Database
172 Inserting Data & Creating a Product
173 MUST READ findById() in Sequelize 5
174 Retrieving Data & Finding Products
175 Getting a Single Product with the where Condition

Working with NoSQL & Using MongoDB
176 Module Introduction
177 Understanding the MongoDB Compass
178 Fetching All Products
179 Fetching a Single Product
180 Making the Edit & Delete Buttons Work Again
181 Working on the Product Model to Edit our Product
182 Finishing the Update Product Code
183 One Note About Updating Products
184 Deleting Products
185 Fixing the Add Product Functionality
186 Creating New Users
187 What is MongoDB
188 Storing the User in our Database
189 Working on Cart Items & Orders
190 Adding the Add to Cart Functionality
191 Storing Multiple Products in the Cart
192 Displaying the Cart Items
193 Fixing a Bug
194 Deleting Cart Items
195 Adding an Order
196 Adding Relational Order Data
197 Getting Orders
198 Relations in NoSQL
199 Removing Deleted Items From the Cart
200 Wrap Up
201 Useful Resources & Links
202 Two Adjustments (behind the scenes)
203 Setting Up MongoDB
204 Installing the MongoDB Driver
205 Creating the Database Connection
206 Finishing the Database Connection
207 Using the Database Connection
208 Creating Products

Working with Mongoose
209 Module Introduction
210 Adding and Using a User Model
211 Using Relations in Mongoose
212 One Important Thing About Fetching Relations
213 Working on the Shopping Cart
214 Loading the Cart
215 Deleting Cart Items
216 Creating & Getting Orders
217 Storing All Order Related Data
218 Clearing the Cart After Storing an Order
219 Getting & Displaying the Orders
220 What is Mongoose
221 Wrap Up
222 Useful Resources & Links
223 Connecting to the MongoDB Server with Mongoose
224 Creating the Product Schema
225 Saving Data Through Mongoose
226 Fetching All Products
227 Fetching a Single Product
228 Updating Products
229 Deleting Products

Sessions & Cookies
230 Module Introduction
231 Initializing the Session Middleware
232 Using the Session Middleware
233 Using MongoDB to Store Sessions
234 Sessions & Cookies – A Short Summary
235 Deleting a Cookie
236 Fixing Some Minor Bugs
237 Making Add to Cart Work Again
238 Two Tiny Improvements
239 Wrap Up
240 What is a Cookie
241 Code Adjustments
242 Useful Resources & Links
243 The Current Project Status
244 Optional Creating the Login Form
245 Adding the Request Driven Login Solution
246 Setting a Cookie
247 Manipulating Cookies
248 Configuring Cookies
249 What is a Session

Adding Authentication
250 Module Introduction
251 Using Middleware to Protect Routes
252 Understanding CSRF Attacks
253 Using a CSRF Token
254 Adding CSRF Protection
255 Fixing the Order Button
256 Providing User Feedback
257 Optional Styling Error Messages
258 Finishing the Flash Messages
259 Adding Additional Flash Messages
260 Wrap Up
261 What is Authentication
262 Useful Resources & Links
263 How is Authentication Implemented
264 Our Updated Project Status
265 Implementing an Authentication Flow
266 Encrypting Passwords
267 Adding a Tiny Code Improvement
268 Adding the Signin Functionality
269 Working on Route Protection

Sending Emails
270 Module Introduction
271 How Does Sending Emails Work
272 Using SendGrid
273 Using Nodemailer to Send an Email
274 Potential Limitation for Large Scale Apps
275 Useful Resources & Links

Advanced Authentication
276 Module Introduction
277 Why Editing Fails
278 Wrap Up
279 Useful Resources & Links
280 Resetting Passwords
281 Implementing the Token Logic
282 Creating the Token
283 Creating the Reset Password Form
284 Adding Logic to Update the Password
285 Why we Need Authorization
286 Adding Authorization
287 Adding Protection to Post Actions

Understanding Validation
288 Module Introduction
289 Keeping User Input
290 Adding Conditional CSS Classes
291 Adding Validation to Login
292 Sanitizing Data
293 Validating Product Addition
294 Validating Product Editing
295 Wrap Up
296 Useful Resources & Links
297 Why Should We Use Validation
298 How to Validate Input
299 Setup & Basic Validation
300 Using Validation Error Messages
301 Built-In & Custom Validators
302 More Validators
303 Checking For Field Equality
304 Adding Async Validation

Error Handling
305 Module Introduction
306 Status Codes
307 Available Status Codes
308 Wrap Up
309 Useful Resources & Links
310 Types of Errors & Error Handling
311 Analyzing the Error Handling in the Current Project
312 Errors – Some Theory
313 Throwing Errors in Code
314 Returning Error Pages
315 Using the Express.js Error Handling Middleware
316 Updating the App
317 Using the Error Handling Middleware Correctly

File Upload & Download
318 Module Introduction
319 Downloading Files with Authentication
320 Setting File Type Headers
321 Restricting File Access
322 Streaming Data vs Preloading Data
323 Using PDFKit for .pdf Generation
324 Generating .pdf Files with Order Data
325 Deleting Files
326 Fixing Invoice Links
327 Wrap Up
328 Useful Resources & Links
329 Adding a File Picker to the Frontend
330 Handling Multipart Form Data
331 Handling File Uploads with Multer
332 Configuring Multer to Adjust Filename & Filepath
333 Filtering Files by Mimetype
334 Storing File Data in the Database
335 Remove imageUrl from Add Product
336 Serving Images Statically

Adding Pagination
337 Module Introduction
338 Adding Pagination Links
339 Retrieving a Chunk of Data
340 Skip & Limit with SQL
341 Preparing Pagination Data on the Server
342 Adding Dynamic Pagination Buttons
343 Re-Using the Pagination Logic & Controls
344 Wrap Up
345 Useful Resources & Links

Understanding Async Requests
346 Module Introduction
347 What are Async Requests
348 Adding Client Side JS Code
349 The JSON Data Format
350 Sending & Handling Background Requests
351 Manipulating the DOM
352 Useful Resources & Links

Adding Payments
353 Module Introduction
354 How Payments Work
355 Adding a Checkout Page
356 Using Stripe in Your App
357 Useful Resources & Links

Working with REST APIs – The Basics
358 Module Introduction
359 Wrap Up
360 Useful Resources & Links
361 What are REST APIs and why do we use Them
362 Accessing Data with REST APIs
363 Understanding Routing & HTTP Methods
364 REST APIs – The Core Principles
365 Creating our REST API Project & Implementing the Route Setup
366 Sending Requests & Responses and Working with Postman
367 REST APIs, Clients & CORS Errors
368 Sending POST Requests

Working with REST APIs – The Practical Application
369 Module Introduction
370 Static Images & Error Handling
371 Fetching a Single Post
372 Image Names & Windows
373 Uploading Images
374 Updating Posts
375 Deleting Posts
376 Adding Pagination
377 Adding a User Model
378 Adding User Signup Validation
379 Signing Users Up
380 REST APIs & The Rest Of The Course
381 How Does Authentication Work
382 Starting with User Login
383 Logging In & Creating JSON Web Tokens (JWTs)
384 Using & Validating the Token
385 Adding Auth Middleware to All Routes
386 Connecting Posts & Users
387 Adding Authorization Checks
388 Clearing Post-User Relations
389 Wrap Up
390 Understanding the Frontend Setup
391 Useful Resources & Links
392 Planning the API
393 Fetching Lists of Posts
394 Adding a Create Post Endpoint
395 Adding Server Side Validation
396 Setting Up a Post Model
397 Storing Posts in the Database

Understanding Async Await in Node.js
398 Module Introduction
399 What is Async Await All About
400 Transforming Then Catch to Async Await
401 Top-level await
402 The User Name is Missing!
403 Wrap Up
404 Useful Resources & Links

Understanding Websockets & Socket.io
405 Module Introduction
406 Updating Posts On All Connected Clients
407 Sorting Correctly
408 Deleting Posts Across Clients
409 Wrap Up
410 Useful Resources & Links
411 What Are Websockets & Why Would You Use Them
412 Websocket Solutions – An Overview
413 Setting Up Socket.io on the Server
414 Establishing a Connection From the Client
415 Identifying Realtime Potential
416 Sharing the IO Instance Across Files
417 Synchronizing POST Additions
418 Fixing a Bug – The Missing Username

Working with GraphQL
419 Module Introduction
420 Adding Login Functionality
421 Adding a Create Post Mutation
422 Extracting User Data From the Auth Token
423 Sending the Create Post Query
424 Fixing a Bug & Adding New Posts Correctly
425 Adding a Get Post Query & Resolver
426 Sending Create Post and Get Post Queries
427 Adding Pagination
428 Uploading Images
429 Fetching the imageUrl
430 What is GraphQL
431 Viewing a Single Post
432 Updating Posts
433 Deleting Posts
434 Adding Posts & Pagination
435 Managing the User Status
436 Using Variables
437 Fixing a Pagination Bug
438 Wrap Up
439 Useful Resources & Links
440 Understanding the Setup & Writing our First Query
441 Defining a Mutation Schema
442 Adding a Mutation Resolver & GraphiQL
443 Adding Input Validation
444 Handling Errors
445 Connecting the Frontend to the GraphQL API
446 Adding a Login Query & a Resolver

Deploying our App
447 Module Introduction
448 Setting Up a SSL Server
449 Using a Hosting Provider
450 Understanding the Project & the Git Setup
451 A Deployment Example with Heroku
452 Storing User-generated Files on Heroku
453 Deploying APIs
454 Useful Resources & Links
455 Deploying Different Kinds of Apps
456 Deployment Preparations
457 Using Environment Variables
458 Using Production API Keys
459 Setting Secure Response Headers with Helmet
460 Compressing Assets
461 Setting Up Request Logging
462 More on Logging

Testing Node.js Applications
463 Module Introduction
464 Testing Asynchronous Code
465 Setting up a Testing Database
466 Testing Code With An Active Database
467 Cleaning Up
468 Hooks
469 Testing Code That Requires Authentication
470 Wrap Up & Mastering Tests
471 Useful Resources & Links
472 What is Testing
473 Why & How
474 Setup and Writing a First Test
475 Testing the Auth Middleware
476 Organizing Multiple Tests
477 What Not To Test!
478 Using Stubs
479 Testing Controllers

Node.js as a Build Tool & Using npm
480 Module Introduction
481 npm & Node.js
482 Using npm
483 Versioning in package.json
484 What is a Build Tool
485 Using Node.js in Build Processes
486 Useful Resources & Links

Modern JavaScript & NodeJS
487 Module Introduction
488 What is this Module About
489 Working with ES Modules & Node
490 More on ES Modules
491 Node Core Modules & Promises
492 Module Resources

NodeJS & TypeScript
493 Module Introduction
494 Understanding Generics
495 A First Summary
496 Node & TypeScript Setup
497 Getting Started with Node and TypeScript
498 Writing TypeScript Express.js Code
499 Adding REST Routes with TypeScript
500 Finishing the REST Routes
501 Testing the API
502 Using Type Casting
503 Moving to a Better Project Structure
504 TypeScript What & Why
505 Wrap Up
506 Module Resources
507 TypeScript Setup
508 Assigning Types
509 Type Inference & Type Casting
510 Configuring TypeScript
511 Working with Union Types
512 Using Object & Array Types
513 Working with Type Aliases & Interfaces

An Introduction to Deno
514 Module Introduction
515 How Deno Features Are Organized
516 Using the Standard Library
517 Creating a Webserver
518 Using the Oak Framework with Deno
519 More on Module URLs
520 An Example Node REST API
521 Re-building the REST API with Deno
522 Should You Switch From Node to Deno
523 Module Resources
524 What is Deno
525 Why Deno
526 Deno Setup
527 Writing First Deno Code
528 The Deno Runtime (Namespace) API
529 Using the Runtime API
530 Working with Deno Permissions
531 Repeating the Example with Node

Deno, CRUD & Databases (MongoDB)
532 Module Introduction
533 App Setup
534 Handling CORS Errors
535 Connecting Deno to MongoDB
536 Using the MongoDB Client Module
537 Finishing the Deno MongoDB CRUD Operations
538 Wrap Up
539 Module Resources

Roundup
540 Course Roundup
541 Course Slides
542 Bonus More Content!