4.67 sur 5
4.67

NodeJS – Le guide complet (MVC, API REST, GraphQL, Deno)

Maîtrisez Node JS et Deno.js, créez des API REST avec Node.js, des API GraphQL, ajoutez l'authentification, utilisez MongoDB, SQL et bien plus encore !
Instructeur :
Mahefa Abel
étudiants inscrits1
French
Travailler avec l'un des langages de programmation de développement Web les plus demandés
Apprenez les bases ainsi que les concepts avancés de NodeJS en détail
Créez des applications Web côté serveur modernes, rapides et évolutives avec NodeJS, des bases de données comme SQL ou MongoDB et plus encore
Comprendre l'écosystème NodeJS et créer des applications rendues côté serveur, des API REST et des API GraphQL
Obtenez une introduction approfondie à DenoJS

Rejoignez le cours Node.js le plus complet sur WeCours et découvrez Node de manière pratique et théorique !

Node.js est probablement LE langage de programmation côté serveur le plus populaire et le plus moderne dans lequel vous pouvez vous plonger !

Les développeurs de Node.js sont très demandés et le langage est utilisé pour tout, des applications Web traditionnelles avec des vues rendues côté serveur sur les API REST jusqu’aux API GraphQL et services Web en temps réel. Sans parler de ses applications dans les flux de travail de construction pour des projets de toutes tailles.

Ce cours vous apprendra tout cela ! De zéro sans aucune connaissance préalable. Cependant, si vous apportez des connaissances, vous pourrez bien sûr accéder rapidement aux modules de cours qui vous intéressent le plus.

Voici ce que vous apprendrez dans ce cours :

  • Principes de base de Node.js et modules de base de base
  • Analyse des requêtes et envoi des réponses
  • Rendu HTML dynamique (sur le serveur)
  • Utilisation d’Express.js
  • Travailler avec des fichiers et générer des PDF sur le serveur (à la volée)
  • Charger et télécharger des fichiers
  • Utilisation du modèle Model-View-Controller (MVC) Pattern
  • Utilisation de Node.js avec SQL (MySQL) et Sequelize
  • Utiliser Node.js avec NoSQL (MongoDB) et Mongoose
  • Travailler avec les sessions et les cookies
  • Authentification et autorisation de l’utilisateur
  • Envoi d’e-mails
  • Validation de l’entrée de l’utilisateur
  • Pagination des données
  • Gestion des paiements avec Stripe.js
  • Création d’API REST
  • Authentification dans les API REST
  • Téléchargement de fichiers dans REST  API
  • Construire des API GraphQL
  • Authentification dans les API GraphQL
  • Téléchargement de fichiers dans les API GraphQL
  • Création d’une application Node.js en temps réel avec Websockets
  • Tests automatisés (tests unitaires )
  • Déploiement d’une application Node.js
  • Utilisation de TypeScript avec Node.js
  • Explorer Deno.js
  • Et bien plus !

Cela ressemble-t-il à beaucoup de contenu ? ? C’est certainement le cas !

Ce n’est pas un court cours, mais c’est le “Guide complet” sur Node.js après tout. Nous aborderons de nombreux sujets et nous ne nous contenterons pas d’effleurer la surface.

Nous ne nous contenterons pas non plus de parcourir une théorie ennuyeuse et quelques diapositives. Au lieu de cela, nous allons construire deux projets majeurs : une boutique en ligne (comprenant le paiement et les paiements) et un blog.

Tous les sujets et fonctionnalités du cours seront présentés et utilisés dans ces projets et vous les découvrirez donc dans un environnement réaliste.

 

Ce cours est-il pour vous ?

Si vous n’avez aucune expérience Node.js, vous allez adorer ce cours car il commence avec aucune connaissance supposée. C’est le cours idéal pour devenir développeur Node.js.

Si vous avez une expérience de base de Node.js, ce cours est également parfait car vous pouvez parcourir les modules de base rapidement et vous bénéficierez de tous les sujets approfondis et avancés couverts par le cours.

Êtes-vous un utilisateur node.js avancé ? Consultez le programme dans ce cas. Peut-être n’avez-vous trouvé aucun autre cours qui montre comment utiliser SQL avec Node.js. Ou vous êtes intéressé par GraphQL. Il y a de fortes chances que vous tiriez également beaucoup de valeur de ce cours !

 

Prérequis

  • AUCUNE connaissance de Node.js n’est requise !
  • AUCUNE connaissance d’un autre langage de programmation (à part JavaScript, voir le point suivant) n’est requise
  • Une connaissance de base de JavaScript est cependant supposée – vous devriez au moins être prêt à l’acquérir tout en suivant le cours. Un module de rafraîchissement JS existe pour vous mettre rapidement à jour avec la dernière syntaxe
  • La connaissance de base de HTML+CSS aide mais n’est PAS requise

Introduction

1
Introduction

Welcome to this Node.js course! Let me introduce myself and give you a rough overview of this course and what it's all about!

2
What is Node.js?

What is Node.js? That's the most important question in a Node course I'd argue and in this lecture, we'll explore what exactly NodeJS is and why it's amazing.

3
Join our Online Learning Community

Learning alone is absolutely fine but finding learning partners might be a nice thing, too. Our learning community is a great place to learn and grow together - of course it's 100% free and optional!

4
Installing Node.js and Creating our First App

We know what NodeJS is about - let's now see it in action. For that, let's install Node.js and create our first little application in this lecture.

5
Understanding the Role & Usage of Node.js

Node.js can be used for a broad variety of things - web servers being the most prominent use-case probably. In this lecture, you'll get an overview of the different things NodeJS can be used for.

6
Course Outline

We got a good idea of what Node.js is, now it's time to understand what exactly is in the course. In this lecture, I'll give you a good overview of the course content and the order in which it is presented.

7
How To Get The Most Out Of The Course

Your course success matters to me, hence in this lecture, I'll share some best practices regarding the course taking process and how you can get the most out of this course.

8
Working with the REPL vs Using Files

When writing Node code, you got two main options: Files which you execute or the REPL. This lecture explains + explores both alternatives.

9
Using the Attached Source Code

Stuck? Got an error you can't debug on your own? You find snapshots of my code attached to multiple lectures in the course! More information can be found in this lecture.

Optional: JavaScript - A Quick Refresher

1
Module Introduction
2
JavaScript in a Nutshell
3
Refreshing the Core Syntax
4
let & const
5
Understanding Arrow Functions
6
Working with Objects, Properties & Methods
7
Arrays & Array Methods
8
Arrays, Objects & Reference Types
9
Understanding Spread & Rest Operators
10
Destructuring
11
Async Code & Promises
12
Template Literals
13
Wrap Up
14
Useful Resources & Links

Understanding the Basics

1
Module Introduction
2
How The Web Works
3
Creating a Node Server
4
The Node Lifecycle & Event Loop
5
Controlling the Node.js Process
6
Understanding Requests
7
Sending Responses
8
Request & Response Headers
9
Routing Requests
10
Redirecting Requests
11
Parsing Request Bodies
12
Understanding Event Driven Code Execution
13
Blocking and Non-Blocking Code
14
Node.js - Looking Behind the Scenes
15
Using the Node Modules System
16
Wrap Up
17
Time to Practice - The Basics
18
Useful Resources & Links

Improved Development Workflow and Debugging

1
Module Introduction
2
Understanding NPM Scripts
3
Installing 3rd Party Packages
4
Global Features vs Core Modules vs Third-Party Modules
5
Using Nodemon for Autorestarts
6
Global & Local npm Packages
7
Understanding different Error Types
8
Finding & Fixing Syntax Errors
9
Dealing with Runtime Errors
10
Logical Errors
11
Using the Debugger
12
Restarting the Debugger Automatically After Editing our App
13
Debugging Node.js in Visual Studio Code
14
Changing Variables in the Debug Console
15
Wrap Up
16
Useful Resources & Links

Working with Express.js

1
Module Introduction
2
What is Express.js?
3
Installing Express.js
4
Adding Middleware
5
How Middleware Works
6
Express.js - Looking Behind the Scenes
7
Handling Different Routes
8
Time to Practice - Express.js
9
Parsing Incoming Requests
10
Limiting Middleware Execution to POST Requests
11
Using Express Router
12
Adding a 404 Error Page
13
Filtering Paths
14
Creating HTML Pages
15
Serving HTML Pages
16
Returning a 404 Page
17
A Hint!
18
Using a Helper Function for Navigation
19
Styling our Pages
20
Serving Files Statically
21
Time to Practice - Navigation
22
Wrap Up
23
Useful Resources & Links

Working with Dynamic Content & Adding Templating Engines

1
Module Introduction
2
Sharing Data Across Requests & Users
3
Templating Engines - An Overview
4
Installing & Implementing Pug
5
Outputting Dynamic Content
6
Official Pug Docs
7
Converting HTML Files to Pug
8
Adding a Layout
9
Finishing the Pug Template
10
Avoiding an Error
11
Working with Handlebars
12
Converting our Project to Handlebars
13
Adding the Layout to Handlebars
14
Working with EJS
15
Working on the Layout with Partials
16
Wrap Up
17
Time to Practice - Templating Engines
18
[OPTIONAL] Assignment Solution
19
Useful Resources & Links

The Model View Controller (MVC)

1
Module Introduction
2
What is the MVC?
3
Adding Controllers
4
Finishing the Controllers
5
Adding a Product Model
6
Storing Data in Files Via the Model
7
Fetching Data from Files Via the Model
8
Refactoring the File Storage Code
9
Wrap Up
10
Useful Resources & Links

Optional: Enhancing the App

1
Module Introduction
2
Creating the Shop Structure
3
Working on the Navigation
4
Registering the Routes
5
Storing Product Data
6
Displaying Product Data
7
Editing & Deleting Products
8
Adding Another Item
9
Useful Resources & Links

Dynamic Routes & Advanced Models

1
Module Introduction
2
Preparations
3
Applied Changes
4
Adding the Product ID to the Path
5
Extracting Dynamic Params
6
Loading Product Detail Data
7
Rendering the Product Detail View
8
Passing Data with POST Requests
9
Adding a Cart Model
10
Using Query Params
11
Pre-Populating the Edit Product Page with Data
12
Linking to the Edit Page
13
Editing the Product Data
14
Adding the Product-Delete Functionality
15
Deleting Cart Items
16
Displaying Cart Items on the Cart Page
17
Deleting Cart Items
18
Fixing a Delete Product Bug
19
Wrap Up
20
Useful Resources & Links

SQL Introduction

1
Module Introduction
2
Choosing a Database
3
NoSQL Introduction
4
Comparing SQL and NoSQL
5
Setting Up MySQL
6
Connecting our App to the SQL Database
7
Basic SQL & Creating a Table
8
Retrieving Data
9
Fetching Products
10
Fetching Products - Time to Practice
11
Inserting Data Into the Database
12
Fetching a Single Product with the "where" Condition
13
Wrap Up
14
Useful Resources & Links

Understanding Sequelize

1
Module Introduction
2
What is Sequelize?
3
Connecting to the Database
4
Defining a Model
5
Syncing JS Definitions to the Database
6
Inserting Data & Creating a Product
7
MUST READ: findById() in Sequelize 5
8
Retrieving Data & Finding Products
9
Getting a Single Product with the "where" Condition
10
Fetching Admin Products
11
Updating Products
12
Deleting Products
13
Creating a User Model
14
Adding a One-To-Many Relationship
15
Creating & Managing a Dummy User
16
Using Magic Association Methods
17
Fetching Related Products
18
One-To-Many & Many-To-Many Relations
19
Creating & Fetching a Cart
20
Adding New Products to the Cart
21
Adding Existing Products & Retrieving Cart Items
22
Deleting Related Items & Deleting Cart Products
23
Adding an Order Model
24
Storing Cartitems as Orderitems
25
Resetting the Cart & Fetching and Outputting Orders
26
Wrap Up
27
Useful Resources & Links

Working with NoSQL & Using MongoDB

1
Module Introduction
2
What is MongoDB?
3
Relations in NoSQL
4
Setting Up MongoDB
5
Installing the MongoDB Driver
6
Creating the Database Connection
7
Finishing the Database Connection
8
Using the Database Connection
9
Creating Products
10
Understanding the MongoDB Compass
11
Fetching All Products
12
Fetching a Single Product
13
Making the "Edit" & "Delete" Buttons Work Again
14
Working on the Product Model to Edit our Product
15
Finishing the "Update Product" Code
16
One Note About Updating Products
17
Deleting Products
18
Fixing the "Add Product" Functionality
19
Creating New Users
20
Storing the User in our Database
21
Working on Cart Items & Orders
22
Adding the "Add to Cart" Functionality
23
Storing Multiple Products in the Cart
24
Displaying the Cart Items
25
Fixing a Bug
26
Deleting Cart Items
27
Adding an Order
28
Adding Relational Order Data
29
Getting Orders
30
Removing Deleted Items From the Cart
31
Wrap Up
32
Useful Resources & Links
33
Two Adjustments (behind the scenes)

Working with Mongoose

1
Module Introduction
2
What is Mongoose?
3
Connecting to the MongoDB Server with Mongoose
4
Creating the Product Schema
5
Saving Data Through Mongoose
6
Fetching All Products
7
Fetching a Single Product
8
Updating Products
9
Deleting Products
10
Adding and Using a User Model
11
Using Relations in Mongoose
12
One Important Thing About Fetching Relations
13
Working on the Shopping Cart
14
Loading the Cart
15
Deleting Cart Items
16
Creating & Getting Orders
17
Storing All Order Related Data
18
Clearing the Cart After Storing an Order
19
Getting & Displaying the Orders
20
Wrap Up
21
Useful Resources & Links

Sessions & Cookies

1
Module Introduction
2
What is a Cookie?
3
The Current Project Status
4
Optional: Creating the Login Form
5
Adding the Request Driven Login Solution
6
Setting a Cookie
7
Manipulating Cookies
8
Configuring Cookies
9
What is a Session?
10
Initializing the Session Middleware
11
Using the Session Middleware
12
Using MongoDB to Store Sessions
13
Sessions & Cookies - A Short Summary
14
Time to Practice - Sessions and Cookies
15
Deleting a Cookie
16
Fixing Some Minor Bugs
17
Making "Add to Cart" Work Again
18
Two Tiny Improvements
19
Wrap Up
20
Code Adjustments
21
Useful Resources & Links

Adding Authentication

1
Module Introduction
2
What is Authentication?
3
How is Authentication Implemented?
4
Our Updated Project Status
5
Implementing an Authentication Flow
6
Encrypting Passwords
7
Adding a Tiny Code Improvement
8
Adding the Signin Functionality
9
Working on Route Protection
10
Using Middleware to Protect Routes
11
Understanding CSRF Attacks
12
Using a CSRF Token
13
Adding CSRF Protection
14
Fixing the Order Button
15
Providing User Feedback
16
Optional: Styling Error Messages
17
Finishing the Flash Messages
18
Adding Additional Flash Messages
19
Wrap Up
20
Useful Resources & Links

Sending Emails

1
Module Introduction
2
How Does Sending Emails Work?
3
Using SendGrid
4
Using Nodemailer to Send an Email
5
Potential Limitation for Large Scale Apps
6
Useful Resources & Links

Advanced Authentication

1
Module Introduction
2
Resetting Passwords
3
Implementing the Token Logic
4
Creating the Token
5
Creating the Reset Password Form
6
Adding Logic to Update the Password
7
Why we Need Authorization
8
Adding Authorization
9
Adding Protection to Post Actions
10
Why Editing Fails
11
Wrap Up
12
Useful Resources & Links

Understanding Validation

1
Module Introduction
2
Why Should We Use Validation?
3
How to Validate Input?
4
Setup & Basic Validation
5
Using Validation Error Messages
6
Built-In & Custom Validators
7
More Validators
8
Checking For Field Equality
9
Adding Async Validation
10
Time to Practice - Validation
11
Keeping User Input
12
Adding Conditional CSS Classes
13
Adding Validation to Login
14
Sanitizing Data
15
Validating Product Addition
16
Validating Product Editing
17
Wrap Up
18
Useful Resources & Links

Error Handling

1
Module Introduction
2
Types of Errors & Error Handling
3
Analyzing the Error Handling in the Current Project
4
Errors - Some Theory
5
Throwing Errors in Code
6
Returning Error Pages
7
Using the Express.js Error Handling Middleware
8
Updating the App
9
Using the Error Handling Middleware Correctly
10
Status Codes
11
Available Status Codes
12
Wrap Up
13
Useful Resources & Links

File Upload & Download

1
Module Introduction
2
Adding a File Picker to the Frontend
3
Handling Multipart Form Data
4
Handling File Uploads with Multer
5
Configuring Multer to Adjust Filename & Filepath
6
Filtering Files by Mimetype
7
Storing File Data in the Database
8
Remove imageUrl from "Add Product"
9
Serving Images Statically
10
Downloading Files with Authentication
11
Setting File Type Headers
12
Restricting File Access
13
Streaming Data vs Preloading Data
14
Using PDFKit for .pdf Generation
15
Generating .pdf Files with Order Data
16
Deleting Files
17
Fixing Invoice Links
18
Wrap Up
19
Useful Resources & Links

Adding Pagination

1
Module Introduction
2
Adding Pagination Links
3
Retrieving a Chunk of Data
4
Skip & Limit with SQL
5
Preparing Pagination Data on the Server
6
Adding Dynamic Pagination Buttons
7
Re-Using the Pagination Logic & Controls
8
Wrap Up
9
Useful Resources & Links

Understanding Async Requests

1
Module Introduction
2
What are Async Requests?
3
Adding Client Side JS Code
4
The JSON Data Format
5
Sending & Handling Background Requests
6
Manipulating the DOM
7
Useful Resources & Links

Adding Payments

1
Module Introduction
2
How Payments Work
3
Adding a Checkout Page
4
Using Stripe in Your App
5
Useful Resources & Links

Working with REST APIs - The Basics

1
Module Introduction
2
What are REST APIs and why do we use Them?
3
Accessing Data with REST APIs
4
Understanding Routing & HTTP Methods
5
REST APIs - The Core Principles
6
Creating our REST API Project & Implementing the Route Setup
7
Sending Requests & Responses and Working with Postman
8
REST APIs, Clients & CORS Errors
9
Sending POST Requests
10
Wrap Up
11
Useful Resources & Links

Working with REST APIs - The Practical Application

1
Module Introduction
2
REST APIs & The Rest Of The Course
3
Understanding the Frontend Setup
4
Planning the API
5
Fetching Lists of Posts
6
Adding a Create Post Endpoint
7
Adding Server Side Validation
8
Setting Up a Post Model
9
Storing Posts in the Database
10
Static Images & Error Handling
11
Fetching a Single Post
12
Image Names & Windows
13
Uploading Images
14
Updating Posts
15
Deleting Posts
16
Adding Pagination
17
Adding a User Model
18
Adding User Signup Validation
19
Signing Users Up
20
How Does Authentication Work?
21
Starting with User Login
22
Logging In & Creating JSON Web Tokens (JWTs)
23
Using & Validating the Token
24
Adding Auth Middleware to All Routes
25
Connecting Posts & Users
26
Adding Authorization Checks
27
Clearing Post-User Relations
28
Time to Practice - Working with REST APIs
29
Wrap Up
30
Useful Resources & Links

Understanding Async Await in Node.js

1
Module Introduction
2
What is Async Await All About?
3
Transforming "Then Catch" to "Async Await"
4
Top-level "await"
5
Time to Practice - Async Await
6
The User Name is Missing!
7
Wrap Up
8
Useful Resources & Links

Understanding Websockets & Socket.io

1
Module Introduction
2
What Are Websockets & Why Would You Use Them?
3
Websocket Solutions - An Overview
4
Setting Up Socket.io on the Server
5
Establishing a Connection From the Client
6
Identifying Realtime Potential
7
Sharing the IO Instance Across Files
8
Synchronizing POST Additions
9
Fixing a Bug - The Missing Username
10
Updating Posts On All Connected Clients
11
Sorting Correctly
12
Deleting Posts Across Clients
13
Wrap Up
14
Useful Resources & Links

Working with GraphQL

1
Module Introduction
2
What is GraphQL?
3
Understanding the Setup & Writing our First Query
4
Defining a Mutation Schema
5
Adding a Mutation Resolver & GraphiQL
6
Adding Input Validation
7
Handling Errors
8
Connecting the Frontend to the GraphQL API
9
Adding a Login Query & a Resolver
10
Adding Login Functionality
11
Adding a Create Post Mutation
12
Extracting User Data From the Auth Token
13
Sending the "Create Post" Query
14
Fixing a Bug & Adding New Posts Correctly
15
Adding a "Get Post" Query & Resolver
16
Sending "Create Post" and "Get Post" Queries
17
Adding Pagination
18
Uploading Images
19
Fetching the imageUrl
20
Viewing a Single Post
21
Updating Posts
22
Deleting Posts
23
Adding Posts & Pagination
24
Managing the User Status
25
Using Variables
26
Fixing a Pagination Bug
27
Wrap Up
28
Useful Resources & Links

Deploying our App

1
Module Introduction
2
Deploying Different Kinds of Apps
3
Deployment Preparations
4
Using Environment Variables
5
Using Production API Keys
6
Setting Secure Response Headers with Helmet
7
Compressing Assets
8
Setting Up Request Logging
9
More on Logging
10
Setting Up a SSL Server
11
Using a Hosting Provider
12
Understanding the Project & the Git Setup
13
A Deployment Example with Heroku
14
Storing User-generated Files on Heroku
15
Deploying APIs
16
Useful Resources & Links

Testing Node.js Applications

1
Module Introduction
2
What is Testing?
3
Why & How?
4
Setup and Writing a First Test
5
Testing the Auth Middleware
6
Organizing Multiple Tests
7
What Not To Test!
8
Using Stubs
9
Testing Controllers
10
Testing Asynchronous Code
11
Setting up a Testing Database
12
Testing Code With An Active Database
13
Cleaning Up
14
Hooks
15
Testing Code That Requires Authentication
16
Wrap Up & Mastering Tests
17
Useful Resources & Links

Node.js as a Build Tool & Using npm

1
Module Introduction
2
npm & Node.js
3
Using npm
4
Versioning in package.json
5
What is a Build Tool?
6
Using Node.js in Build Processes
7
Useful Resources & Links

Modern JavaScript & NodeJS

1
Module Introduction
2
What is this Module About?
3
Working with ES Modules & Node
4
More on ES Modules
5
Node Core Modules & Promises
6
Module Resources

NodeJS & TypeScript

1
Module Introduction
2
TypeScript: What & Why?
3
TypeScript Setup
4
Assigning Types
5
Type Inference & Type Casting
6
Configuring TypeScript
7
Working with Union Types
8
Using Object & Array Types
9
Working with Type Aliases & Interfaces
10
Understanding Generics
11
A First Summary
12
Node & TypeScript: Setup
13
Getting Started with Node and TypeScript
14
Writing TypeScript Express.js Code
15
Adding REST Routes with TypeScript
16
Finishing the REST Routes
17
Testing the API
18
Using Type Casting
19
Moving to a Better Project Structure
20
Wrap Up
21
Module Resources

An Introduction to Deno

1
Module Introduction
2
What is Deno?
3
Why Deno?
4
Deno Setup
5
Writing First Deno Code
6
The Deno Runtime (Namespace) API
7
Using the Runtime API
8
Working with Deno Permissions
9
Repeating the Example with Node
10
How Deno Features Are Organized
11
Using the Standard Library
12
Creating a Webserver
13
Using the Oak Framework with Deno
14
More on Module URLs
15
An Example Node REST API
16
Re-building the REST API with Deno
17
Should You Switch From Node to Deno?
18
Module Resources

Deno, CRUD & Databases (MongoDB)

1
Module Introduction
2
App Setup
3
Handling CORS Errors
4
Connecting Deno to MongoDB
5
Using the MongoDB Client Module
6
Finishing the Deno MongoDB CRUD Operations
7
Wrap Up
8
Module Resources

Roundup

1
Course Roundup
2
Course Slides
3
Bonus: More Content!
4.7
4.7 sur 5
Notes33108

Détails des Notes

Étoiles 5
22828
Étoiles 4
8400
Étoiles 3
1488
Étoiles 2
201
Étoiles 1
191
Garantie de remboursement de 30 jours

Inclut

40 heures de vidéo à la demande
Accès complet à vie
Accès sur le mobile et la télévision
Certificat d'achèvement

Archive

Working hours

Monday 9:30 am - 6.00 pm
Tuesday 9:30 am - 6.00 pm
Wednesday 9:30 am - 6.00 pm
Thursday 9:30 am - 6.00 pm
Friday 9:30 am - 5.00 pm
Saturday Closed
Sunday Closed