English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 544 lectures (40h 31m) | 18.83 GB
Master Node JS & Deno.js, build REST APIs with Node.js, GraphQL APIs, add Authentication, use MongoDB, SQL & much more!
This course was updated to also include sections on Deno.js – in addition to more than 30 hours of content on Node.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 What is Node.js
3 Join our Online Learning Community
4 Installing Node.js and Creating our First App
5 Understanding the Role & Usage of Node.js
6 Course Outline
7 How To Get The Most Out Of The Course
8 Course Setup
9 Working with the REPL vs Using Files
10 Using the Attached Source Code
Optional_ JavaScript – A Quick Refresher
11 Module Introduction
12 JavaScript in a Nutshell
13 Refreshing the Core Syntax
14 let & const
15 Understanding Arrow Functions
16 Working with Objects, Properties & Methods
17 Arrays & Array Methods
18 Arrays, Objects & Reference Types
19 Understanding Spread & Rest Operators
20 Destructuring
21 Async Code & Promises
22 Template Literals
23 Wrap Up
24 Useful Resources & Links
Understanding the Basics
25 Module Introduction
26 How The Web Works
27 Creating a Node Server
28 The Node Lifecycle & Event Loop
29 Controlling the Node.js Process
30 Understanding Requests
31 Sending Responses
32 Request & Response Headers
33 Routing Requests
34 Redirecting Requests
35 Parsing Request Bodies
36 Understanding Event Driven Code Execution
37 Blocking and Non-Blocking Code
38 Node.js – Looking Behind the Scenes
39 Using the Node Modules System
40 Wrap Up
41 Useful Resources & Links
Improved Development Workflow and Debugging
42 Module Introduction
43 Understanding NPM Scripts
44 Installing 3rd Party Packages
45 Global Features vs Core Modules vs Third-Party Modules
46 Using Nodemon for Autorestarts
47 Global & Local npm Packages
48 Understanding different Error Types
49 Finding & Fixing Syntax Errors
50 Dealing with Runtime Errors
51 Logical Errors
52 Using the Debugger
53 Restarting the Debugger Automatically After Editing our App
54 Debugging Node.js in Visual Studio Code
55 Changing Variables in the Debug Console
56 Wrap Up
57 Useful Resources & Links
Working with Express.js
58 Module Introduction
59 What is Express.js_
60 Installing Express.js
61 Adding Middleware
62 How Middleware Works
63 Express.js – Looking Behind the Scenes
64 Handling Different Routes
65 Parsing Incoming Requests
66 Limiting Middleware Execution to POST Requests
67 Using Express Router
68 Adding a 404 Error Page
69 Filtering Paths
70 Creating HTML Pages
71 Serving HTML Pages
72 Returning a 404 Page
73 Using a Helper Function for Navigation
74 Styling our Pages
75 Serving Files Statically
76 Wrap Up
77 Useful Resources & Links
78 add-product
79 shop
Working with Dynamic Content & Adding Templating Engines
80 Module Introduction
81 Sharing Data Across Requests & Users
82 Templating Engines – An Overview
83 Installing & Implementing Pug
84 Outputting Dynamic Content
85 Official Pug Docs
86 Converting HTML Files to Pug
87 Adding a Layout
88 Finishing the Pug Template
89 Avoiding an Error
90 Working with Handlebars
91 Converting our Project to Handlebars
92 Adding the Layout to Handlebars
93 Working with EJS
94 Working on the Layout with Partials
95 Wrap Up
96 [OPTIONAL] Assignment Solution
97 Useful Resources & Links
The Model View Controller (MVC)
98 Module Introduction
99 What is the MVC_
100 Adding Controllers
101 Finishing the Controllers
102 Adding a Product Model
103 Storing Data in Files Via the Model
104 Fetching Data from Files Via the Model
105 Refactoring the File Storage Code
106 Wrap Up
107 Useful Resources & Links
Optional_ Enhancing the App
108 Module Introduction
109 Creating the Shop Structure
110 Working on the Navigation
111 Registering the Routes
112 Storing Product Data
113 Displaying Product Data
114 Editing & Deleting Products
115 Adding Another Item
116 Useful Resources & Links
Dynamic Routes & Advanced Models
117 Module Introduction
118 Preparations
119 Applied Changes
120 Adding the Product ID to the Path
121 Extracting Dynamic Params
122 Loading Product Detail Data
123 Rendering the Product Detail View
124 Passing Data with POST Requests
125 Adding a Cart Model
126 Using Query Params
127 Pre-Populating the Edit Product Page with Data
128 Linking to the Edit Page
129 Editing the Product Data
130 Adding the Product-Delete Functionality
131 Deleting Cart Items
132 Displaying Cart Items on the Cart Page
133 Deleting Cart Items
134 Fixing a Delete Product Bug
135 Wrap Up
136 Useful Resources & Links
SQL Introduction
137 Module Introduction
138 Choosing a Database
139 NoSQL Introduction
140 Comparing SQL and NoSQL
141 Setting Up MySQL
142 Connecting our App to the SQL Database
143 Basic SQL & Creating a Table
144 Retrieving Data
145 Fetching Products
146 Fetching Products – Time to Practice
147 Inserting Data Into the Database
148 Fetching a Single Product with the _where_ Condition
149 Wrap Up
150 Useful Resources & Links
Understanding Sequelize
151 Module Introduction
152 What is Sequelize_
153 Connecting to the Database
154 Defining a Model
155 Syncing JS Definitions to the Database
156 Inserting Data & Creating a Product
157 MUST READ_ findById() in Sequelize 5
158 Retrieving Data & Finding Products
159 Getting a Single Product with the _where_ Condition
160 Fetching Admin Products
161 Updating Products
162 Deleting Products
163 Creating a User Model
164 Adding a One-To-Many Relationship
165 Creating & Managing a Dummy User
166 Using Magic Association Methods
167 Fetching Related Products
168 One-To-Many & Many-To-Many Relations
169 Creating & Fetching a Cart
170 Adding New Products to the Cart
171 Adding Existing Products & Retrieving Cart Items
172 Deleting Related Items & Deleting Cart Products
173 Adding an Order Model
174 Storing Cartitems as Orderitems
175 Resetting the Cart & Fetching and Outputting Orders
176 Wrap Up
177 Useful Resources & Links
Working with NoSQL & Using MongoDB
178 Module Introduction
179 What is MongoDB_
180 Relations in NoSQL
181 Setting Up MongoDB
182 Installing the MongoDB Driver
183 Creating the Database Connection
184 Finishing the Database Connection
185 Using the Database Connection
186 Creating Products
187 Understanding the MongoDB Compass
188 Fetching All Products
189 Fetching a Single Product
190 Making the _Edit_ & _Delete_ Buttons Work Again
191 Working on the Product Model to Edit our Product
192 Finishing the _Update Product_ Code
193 One Note About Updating Products
194 Deleting Products
195 Fixing the _Add Product_ Functionality
196 Creating New Users
197 Storing the User in our Database
198 Working on Cart Items & Orders
199 Adding the _Add to Cart_ Functionality
200 Storing Multiple Products in the Cart
201 Displaying the Cart Items
202 Fixing a Bug
203 Deleting Cart Items
204 Adding an Order
205 Adding Relational Order Data
206 Getting Orders
207 Removing Deleted Items From the Cart
208 Wrap Up
209 Useful Resources & Links
210 Two Adjustments (behind the scenes)
Working with Mongoose
211 Module Introduction
212 What is Mongoose_
213 Connecting to the MongoDB Server with Mongoose
214 Creating the Product Schema
215 Saving Data Through Mongoose
216 Fetching All Products
217 Fetching a Single Product
218 Updating Products
219 Deleting Products
220 Adding and Using a User Model
221 Using Relations in Mongoose
222 One Important Thing About Fetching Relations
223 Working on the Shopping Cart
224 Loading the Cart
225 Deleting Cart Items
226 Creating & Getting Orders
227 Storing All Order Related Data
228 Clearing the Cart After Storing an Order
229 Getting & Displaying the Orders
230 Wrap Up
231 Useful Resources & Links
Sessions & Cookies
232 Module Introduction
233 What is a Cookie_
234 The Current Project Status
235 Optional_ Creating the Login Form
236 Adding the Request Driven Login Solution
237 Setting a Cookie
238 Manipulating Cookies
239 Configuring Cookies
240 What is a Session_
241 Initializing the Session Middleware
242 Using the Session Middleware
243 Using MongoDB to Store Sessions
244 Sessions & Cookies – A Short Summary
245 Deleting a Cookie
246 Fixing Some Minor Bugs
247 Making _Add to Cart_ Work Again
248 Two Tiny Improvements
249 Wrap Up
250 Code Adjustments
251 Useful Resources & Links
Adding Authentication
252 Module Introduction
253 What is Authentication_
254 How is Authentication Implemented_
255 Our Updated Project Status
256 Implementing an Authentication Flow
257 Encrypting Passwords
258 Adding a Tiny Code Improvement
259 Adding the Signin Functionality
260 Working on Route Protection
261 Using Middleware to Protect Routes
262 Understanding CSRF Attacks
263 Using a CSRF Token
264 Adding CSRF Protection
265 Fixing the Order Button
266 Providing User Feedback
267 Optional_ Styling Error Messages
268 Finishing the Flash Messages
269 Adding Additional Flash Messages
270 Wrap Up
271 Useful Resources & Links
Sending Emails
272 Module Introduction
273 How Does Sending Emails Work_
274 Using SendGrid
275 Using Nodemailer to Send an Email
276 Potential Limitation for Large Scale Apps
277 Useful Resources & Links
Advanced Authentication
278 Module Introduction
279 Resetting Passwords
280 Implementing the Token Logic
281 Creating the Token
282 Creating the Reset Password Form
283 Adding Logic to Update the Password
284 Why we Need Authorization
285 Adding Authorization
286 Adding Protection to Post Actions
287 Why Editing Fails
288 Wrap Up
289 Useful Resources & Links
Understanding Validation
290 Module Introduction
291 Why Should We Use Validation_
292 How to Validate Input_
293 Setup & Basic Validation
294 Using Validation Error Messages
295 Built-In & Custom Validators
296 More Validators
297 Checking For Field Equality
298 Adding Async Validation
299 Keeping User Input
300 Adding Conditional CSS Classes
301 Adding Validation to Login
302 Sanitizing Data
303 Validating Product Addition
304 Validating Product Editing
305 Wrap Up
306 Useful Resources & Links
Error Handling
307 Module Introduction
308 Types of Errors & Error Handling
309 Analyzing the Error Handling in the Current Project
310 Errors – Some Theory
311 Throwing Errors in Code
312 Returning Error Pages
313 Using the Express.js Error Handling Middleware
314 Updating the App
315 Using the Error Handling Middleware Correctly
316 Status Codes
317 Available Status Codes
318 Wrap Up
319 Useful Resources & Links
File Upload & Download
320 Module Introduction
321 Adding a File Picker to the Frontend
322 Handling Multipart Form Data
323 Handling File Uploads with Multer
324 Configuring Multer to Adjust Filename & Filepath
325 Filtering Files by Mimetype
326 Storing File Data in the Database
327 Remove imageUrl from _Add Product_
328 Serving Images Statically
329 Downloading Files with Authentication
330 Setting File Type Headers
331 Restricting File Access
332 Streaming Data vs Preloading Data
333 Using PDFKit for .pdf Generation
334 Generating .pdf Files with Order Data
335 Deleting Files
336 Fixing Invoice Links
337 Wrap Up
338 Useful Resources & Links
Adding Pagination
339 Module Introduction
340 Adding Pagination Links
341 Retrieving a Chunk of Data
342 Skip & Limit with SQL
343 Preparing Pagination Data on the Server
344 Adding Dynamic Pagination Buttons
345 Re-Using the Pagination Logic & Controls
346 Wrap Up
347 Useful Resources & Links
Understanding Async Requests
348 Module Introduction
349 What are Async Requests_
350 Adding Client Side JS Code
351 The JSON Data Format
352 Sending & Handling Background Requests
353 Manipulating the DOM
354 Useful Resources & Links
Adding Payments
355 Module Introduction
356 How Payments Work
357 Adding a Checkout Page
358 Using Stripe in Your App
359 Useful Resources & Links
Working with REST APIs – The Basics
360 Module Introduction
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
369 Wrap Up
370 Useful Resources & Links
Working with REST APIs – The Practical Application
371 Module Introduction
372 REST APIs & The Rest Of The Course
373 Understanding the Frontend Setup
374 Planning the API
375 Fetching Lists of Posts
376 Adding a Create Post Endpoint
377 Adding Server Side Validation
378 Setting Up a Post Model
379 Storing Posts in the Database
380 Static Images & Error Handling
381 Fetching a Single Post
382 Image Names & Windows
383 Uploading Images
384 Updating Posts
385 Deleting Posts
386 Adding Pagination
387 Adding a User Model
388 Adding User Signup Validation
389 Signing Users Up
390 How Does Authentication Work_
391 Starting with User Login
392 Logging In & Creating JSON Web Tokens (JWTs)
393 Using & Validating the Token
394 Adding Auth Middleware to All Routes
395 Connecting Posts & Users
396 Adding Authorization Checks
397 Clearing Post-User Relations
398 Wrap Up
399 Useful Resources & Links
Understanding Async Await in Node.js
400 Module Introduction
401 What is Async Await All About_
402 Transforming _Then Catch_ to _Async Await_
403 Top-level _await_
404 The User Name is Missing!
405 Wrap Up
406 Useful Resources & Links
Understanding Websockets & Socket.io
407 Module Introduction
408 What Are Websockets & Why Would You Use Them_
409 Websocket Solutions – An Overview
410 Setting Up Socket.io on the Server
411 Establishing a Connection From the Client
412 Identifying Realtime Potential
413 Sharing the IO Instance Across Files
414 Synchronizing POST Additions
415 Fixing a Bug – The Missing Username
416 Updating Posts On All Connected Clients
417 Sorting Correctly
418 Deleting Posts Across Clients
419 Wrap Up
420 Useful Resources & Links
Working with GraphQL
421 Module Introduction
422 What is GraphQL_
423 Understanding the Setup & Writing our First Query
424 Defining a Mutation Schema
425 Adding a Mutation Resolver & GraphiQL
426 Adding Input Validation
427 Handling Errors
428 Connecting the Frontend to the GraphQL API
429 Adding a Login Query & a Resolver
430 Adding Login Functionality
431 Adding a Create Post Mutation
432 Extracting User Data From the Auth Token
433 Sending the _Create Post_ Query
434 Fixing a Bug & Adding New Posts Correctly
435 Adding a _Get Post_ Query & Resolver
436 Sending _Create Post_ and _Get Post_ Queries
437 Adding Pagination
438 Uploading Images
439 Fetching the imageUrl
440 Viewing a Single Post
441 Updating Posts
442 Deleting Posts
443 Adding Posts & Pagination
444 Managing the User Status
445 Using Variables
446 Fixing a Pagination Bug
447 Wrap Up
448 Useful Resources & Links
Deploying our App
449 Module Introduction
450 Deploying Different Kinds of Apps
451 Deployment Preparations
452 Using Environment Variables
453 Using Production API Keys
454 Setting Secure Response Headers with Helmet
455 Compressing Assets
456 Setting Up Request Logging
457 More on Logging
458 Setting Up a SSL Server
459 Using a Hosting Provider
460 Understanding the Project & the Git Setup
461 A Deployment Example with Heroku
462 Storing User-generated Files on Heroku
463 Deploying APIs
464 Useful Resources & Links
Testing Node.js Applications
465 Module Introduction
466 What is Testing_
467 Why & How_
468 Setup and Writing a First Test
469 Testing the Auth Middleware
470 Organizing Multiple Tests
471 What Not To Test!
472 Using Stubs
473 Testing Controllers
474 Testing Asynchronous Code
475 Setting up a Testing Database
476 Testing Code With An Active Database
477 Cleaning Up
478 Hooks
479 Testing Code That Requires Authentication
480 Wrap Up & Mastering Tests
481 Useful Resources & Links
Node.js as a Build Tool & Using npm
482 Module Introduction
483 npm & Node.js
484 Using npm
485 Versioning in package.json
486 What is a Build Tool_
487 Using Node.js in Build Processes
488 Useful Resources & Links
Modern JavaScript & NodeJS
489 Module Introduction
490 What is this Module About_
491 Working with ES Modules & Node
492 More on ES Modules
493 Node Core Modules & Promises
494 Module Resources
NodeJS & TypeScript
495 Module Introduction
496 TypeScript_ What & Why_
497 TypeScript Setup
498 Assigning Types
499 Type Inference & Type Casting
500 Configuring TypeScript
501 Working with Union Types
502 Using Object & Array Types
503 Working with Type Aliases & Interfaces
504 Understanding Generics
505 A First Summary
506 Node & TypeScript_ Setup
507 Getting Started with Node and TypeScript
508 Writing TypeScript Express.js Code
509 Adding REST Routes with TypeScript
510 Finishing the REST Routes
511 Testing the API
512 Using Type Casting
513 Moving to a Better Project Structure
514 Wrap Up
515 Module Resources
An Introduction to Deno
516 Module Introduction
517 What is Deno_
518 Why Deno_
519 Deno Setup
520 Writing First Deno Code
521 The Deno Runtime (Namespace) API
522 Using the Runtime API
523 Working with Deno Permissions
524 Repeating the Example with Node
525 How Deno Features Are Organized
526 Using the Standard Library
527 Creating a Webserver
528 Using the Oak Framework with Deno
529 More on Module URLs
530 An Example Node REST API
531 Re-building the REST API with Deno
532 Should You Switch From Node to Deno_
533 Module Resources
Deno, CRUD & Databases (MongoDB)
534 Module Introduction
535 App Setup
536 Handling CORS Errors
537 Connecting Deno to MongoDB
538 Using the MongoDB Client Module
539 Finishing the Deno MongoDB CRUD Operations
540 Wrap Up
541 Module Resources
Roundup
542 Course Roundup
543 Course Slides
544 Bonus_ More Content!
Resolve the captcha to access the links!