NodeJS - The Complete Guide (MVC, REST APIs, GraphQL, Deno)
Master Node JS & Deno.js, build REST APIs with Node.js, GraphQL APIs, add Authentication, use MongoDB, SQL & much more!
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 and a theory-based way!
-
Node.js is probably THE most popular and modern server-side programming language you can learn 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.
Is this course for you?
If you got no Node.js experience, you'll love this course because it starts with zero knowledge assumed. It's the perfect course to become a Node.js developer.
If you got basic Node.js experience, this course is also a perfect match because you can go through the basic modules quickly and you'll benefit from all the deep dives and advanced topics the course covers.
Are you an advanced Node.js user? Check the curriculum then. Maybe you found no other course that shows how to use SQL with Node.js. Or you're interested in GraphQL. Chances are, that you'll get a lot of value out of this course, too!
Prerequisites
NO Node.js knowledge is required at all!
NO other programming language knowledge (besides JavaScript, see next point) is required
Basic JavaScript knowledge is assumed though - you should at least be willing to pick it up whilst going through the course. A JS refresher module exists to bring you up to the latest syntax quickly
Basic HTML + CSS knowledge helps but is NOT required
Khu vực Câu hỏi thường gặp trống
What is Node.js?
Xem trướcJoin our Online Learning Community
Xem trướcInstalling Node.js and Creating our First App
Xem trướcUnderstanding the Role & Usage of Node.js
Xem trướcCourse Outline
Xem trướcHow To Get The Most Out Of The Course
Xem trướcCourse Setup
Working with the REPL vs Using Files
Using the Attached Source Code
Introduction
What is Node.js?
Join our Online Learning Community
Installing Node.js and Creating our First App
Understanding the Role & Usage of Node.js
Course Outline
How To Get The Most Out Of The Course
Course Setup
Working with the REPL vs Using Files
Using the Attached Source Code
Module Introduction
JavaScript in a Nutshell
Refreshing the Core Syntax
Let & const
Understanding Arrow Functions
Working with Objects, Properties & Methods
Arrays & Array Methods
Arrays, Objects & Reference Types
Understanding Spread & Rest Operators
Destructuring
Async Code & Promises
Template Literals
Wrap Up
Useful Resources & Links
Module Introduction
How The Web Works
Creating a Node Server
The Node Lifecycle & Event Loop
Controlling the Node.js Process
Understanding Requests
Sending Responses
Request & Response Headers
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
Time to Practice - The Basics
Useful Resources & Links
Module Introduction
Understanding NPM Scripts
Installing 3rd Party Packages
Global Features vs Core Modules vs Third-Party Modules
Using Nodemon for Autorestarts
Global & Local npm Packages
Understanding different Error Types
Finding & Fixing Syntax Errors
Dealing with Runtime Errors
Logical Errors
Using the Debugger
Restarting the Debugger Automatically After Editing our App
Debugging Node.js in Visual Studio Code
Changing Variables in the Debug Console
Wrap Up
Useful Resources & Links
Module Introduction
What is Express.js?
Installing Express.js
Adding Middleware
How Middleware Works
Express.js - Looking Behind the Scenes
Handling Different Routes
Time to Practice - Express.js
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
A Hint!
Using a Helper Function for Navigation
Styling our Pages
Serving Files Statically
Time to Practice - Navigation
Wrap Up
Useful Resources & Links
Module Introduction
Sharing Data Across Requests & Users
Templating Engines - An Overview
Installing & Implementing Pug
Outputting Dynamic Content
Official Pug Docs
Converting HTML Files to Pug
Adding a Layout
Finishing the Pug Template
Avoiding an Error
Working with Handlebars
Converting our Project to Handlebars
Adding the Layout to Handlebars
Working with EJS
Working on the Layout with Partials
Wrap Up
Time to Practice - Templating Engines
[OPTIONAL] Assignment Solution
Useful Resources & Links
Module Introduction
Preparations
Applied Changes
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
Displaying Cart Items on the Cart Page
Deleting Cart Items
Fixing a Delete Product Bug
Wrap Up
Useful Resources & Links
Module Introduction
Choosing a Database
NoSQL Introduction
Comparing SQL and NoSQL
Setting Up MySQL
Connecting our App to the SQL Database
Basic SQL & 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
Useful Resources & Links
Module Introduction
What is Sequelize?
Connecting to the Database
Defining a Model
Syncing JS Definitions to the Database
Inserting Data & Creating a Product
MUST READ: findById() in Sequelize 5
Retrieving Data & 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 & Managing a Dummy User
Using Magic Association Methods
Fetching Related Products
One-To-Many & Many-To-Many Relations
Creating & Fetching a Cart
Adding New Products to the Cart
Adding Existing Products & Retrieving Cart Items
Deleting Related Items & Deleting Cart Products
Adding an Order Model
Storing Cartitems as Orderitems
Resetting the Cart & Fetching and Outputting Orders
Wrap Up
Useful Resources & Links
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" & "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 & 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
Useful Resources & Links
Two Adjustments (behind the scenes)
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 & Getting Orders
Storing All Order Related Data
Clearing the Cart After Storing an Order
Getting & Displaying the Orders
Wrap Up
Useful Resources & Links
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 & Cookies - A Short Summary
Time to Practice - Sessions and Cookies
Deleting a Cookie
Fixing Some Minor Bugs
Making "Add to Cart" Work Again
Two Tiny Improvements
Wrap Up
Code Adjustments
Useful Resources & Links
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
Csurf() Alternatives
Fixing the Order Button
Providing User Feedback
Optional: Styling Error Messages
Finishing the Flash Messages
Adding Additional Flash Messages
Wrap Up
Useful Resources & Links
Module Introduction
Why Should We Use Validation?
How to Validate Input?
Setup & Basic Validation
Using Validation Error Messages
Built-In & Custom Validators
More Validators
Checking For Field Equality
Adding Async Validation
Time to Practice - Validation
Keeping User Input
Adding Conditional CSS Classes
Adding Validation to Login
Sanitizing Data
Validating Product Addition
Validating Product Editing
Wrap Up
Useful Resources & Links
Module Introduction
Types of Errors & Error Handling
Analyzing 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
Available Status Codes
Wrap Up
Useful Resources & Links
Module Introduction
Adding a File Picker to the Frontend
Handling Multipart Form Data
Handling File Uploads with Multer
Configuring Multer to Adjust Filename & Filepath
Filtering Files by Mimetype
Storing File Data in the Database
Remove imageUrl from "Add Product"
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
Useful Resources & Links
Module Introduction
What are REST APIs and why do we use Them?
Accessing Data with REST APIs
Understanding Routing & HTTP Methods
REST APIs - The Core Principles
Creating our REST API Project & Implementing the Route Setup
Sending Requests & Responses and Working with Postman
REST APIs, Clients & CORS Errors
Sending POST Requests
Wrap Up
Useful Resources & Links
Module Introduction
REST APIs & 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 & Error Handling
Fetching a Single Post
Image Names & Windows
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 & Creating JSON Web Tokens (JWTs)
Using & Validating the Token
Adding Auth Middleware to All Routes
Connecting Posts & Users
Adding Authorization Checks
Clearing Post-User Relations
Time to Practice - Working with REST APIs
Wrap Up
Useful Resources & Links
Module Introduction
What Are Websockets & 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
Useful Resources & Links
Module Introduction
What is GraphQL?
Understanding the Setup & Writing our First Query
Defining a Mutation Schema
Adding a Mutation Resolver & GraphiQL
Adding Input Validation
Handling Errors
Connecting the Frontend to the GraphQL API
Adding a Login Query & 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 & Adding New Posts Correctly
Adding a "Get Post" Query & Resolver
Sending "Create Post" and "Get Post" Queries
Adding Pagination
Uploading Images
Fetching the imageUrl
Viewing a Single Post
Updating Posts
Deleting Posts
Adding Posts & Pagination
Managing the User Status
Using Variables
Fixing a Pagination Bug
Wrap Up
Useful Resources & Links
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
More on Logging
Setting Up a SSL Server
Using a Hosting Provider
Understanding the Project & the Git Setup
A Deployment Example with Heroku
Storing User-generated Files on Heroku
Deploying APIs
Useful Resources & Links
Module Introduction
What is Testing?
Why & 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 & Mastering Tests
Useful Resources & Links
Module Introduction
TypeScript: What & Why?
TypeScript Setup
Assigning Types
Type Inference & Type Casting
Configuring TypeScript
Working with Union Types
Using Object & Array Types
Working with Type Aliases & Interfaces
Understanding Generics
A First Summary
Node & TypeScript: Setup
Getting Started with Node and TypeScript
Writing TypeScript Express.js Code
Adding REST Routes with TypeScript
Finishing the REST Routes
Testing the API
Using Type Casting
Moving to a Better Project Structure
Wrap Up
Module Resources
Module Introduction
What is Deno?
Why Deno?
Deno Setup
Writing First Deno Code
The Deno Runtime (Namespace) API
Using the Runtime API
Working with Deno Permissions
Repeating the Example with Node
How Deno Features Are Organized
Using the Standard Library
Creating a Webserver
Using the Oak Framework with Deno
More on Module URLs
An Example Node REST API
Re-building the REST API with Deno
Should You Switch From Node to Deno?
Module Resources
General knowledge of how the web works is recommended but not a must-have
Basic JavaScript knowledge is strongly recommended but could be picked up whilst going through the course
NO NodeJS knowledge is required!
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
1.0
0 Học viên
105 Khóa học
1252 Đánh giá
Xin chào các bạn, tôi là Nguyễn Đình Cường, một lập trình viên và giảng viên đam mê công nghệ với hơn 15 năm kinh nghiệm trong ngành công nghiệp phần mềm. Tôi tốt nghiệp từ Bưu Chính Viễn Thông và đã từng làm việc cho một số công ty công nghệ hàng đầu như FPT Software và VinGroup. Với chuyên môn chính là phát triển ứng dụng web, tôi đã làm việc với nhiều công nghệ như HTML, CSS, JavaScript, React cho front-end và Node.js, Express, MongoDB cho back-end. Không chỉ dừng lại ở việc viết mã, tôi còn yêu thích tìm hiểu sâu về thiết kế hệ thống và kiến trúc phần mềm. Tôi tin rằng quá trình học lập trình không chỉ đơn thuần là lý thuyết, mà còn là sự trải nghiệm thực tế và giải quyết vấn đề. Trong các khóa học của mình, tôi cố gắng cung cấp cho học viên những bài giảng thú vị và dễ hiểu, cùng với các bài tập thực hành giúp củng cố kiến thức. Tôi hy vọng rằng qua các khóa học của mình, bạn sẽ không chỉ học được cách viết mã, mà còn phát triển tư duy lập trình và kỹ năng giải quyết vấn đề. Hãy cùng nhau khám phá thế giới lập trình và biến ý tưởng của bạn thành hiện thực! Nếu bạn có bất kỳ câu hỏi nào, đừng ngần ngại liên hệ với tôi. Tôi rất vui được hỗ trợ bạn trong hành trình học tập của mình!
Xem chi tiết