Nodejs Practices Modularize Your Code, High school final essays of Computer science

Use Asynchronous Programming: Node.js is designed to work asynchronously, so make use of callbacks, Promises, or async/await to handle asynchronous operations. This helps prevent blocking the event loop and keeps your application responsive.

Typology: High school final essays

2021/2022

Uploaded on 10/10/2023

vijay-sandy
vijay-sandy 🇮🇳

1 document

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Nodejs Practices
Basic Folder Structure
The Event Loop in Practice
Events and Event-Driven Architecture
How Requiring Modules Really Works
The Problem with Callbacks: Callback Hell
From Callback Hell to Promises
Building Promises
Consuming Promises with Async/Await
Returning Values from Async Functions
Waiting for Multiple Promises Simultaneously
Setting up Express and Basic Routing
APIs and RESTful API Design
Handling GET,POST,PUT,PATCH, DELETE Requests
Refactoring Our Routes
Middleware and the Request-Response Cycle
Creating Our Own Middleware
Using 3rd-Party Middleware
Creating and Mounting Multiple Routers
Param Middleware
Chaining Multiple Middleware Functions
Serving Static Files
Environment Variables
Setting up ESLint + Prettier in VS Code
Debugging Node.js with ndb
Handling Unhandled Routes
An Overview of Error Handling
Implementing a Global Error Handling Middleware
Better Errors and Refactoring
Catching Errors in Async Functions
Adding 404 Not Found Errors
Errors During Development vs Production
Handling Invalid Database IDs
Handling Duplicate Database Fields
Catching Uncaught Exceptions
How Authentication with JWT Works
Protecting Tour Routes
Authorization: User Roles and Permissions
Password Reset Functionality: Reset Token
Sending Emails with Nodemailer
Sending JWT via Cookie
Implementing Rate Limiting
pf2

Partial preview of the text

Download Nodejs Practices Modularize Your Code and more High school final essays Computer science in PDF only on Docsity!

Nodejs Practices

Basic Folder Structure The Event Loop in Practice Events and Event-Driven Architecture How Requiring Modules Really Works The Problem with Callbacks: Callback Hell From Callback Hell to Promises Building Promises Consuming Promises with Async/Await Returning Values from Async Functions Waiting for Multiple Promises Simultaneously Setting up Express and Basic Routing APIs and RESTful API Design Handling GET,POST,PUT,PATCH, DELETE Requests Refactoring Our Routes Middleware and the Request-Response Cycle Creating Our Own Middleware Using 3rd-Party Middleware Creating and Mounting Multiple Routers Param Middleware Chaining Multiple Middleware Functions Serving Static Files Environment Variables Setting up ESLint + Prettier in VS Code Debugging Node.js with ndb Handling Unhandled Routes An Overview of Error Handling Implementing a Global Error Handling Middleware Better Errors and Refactoring Catching Errors in Async Functions Adding 404 Not Found Errors Errors During Development vs Production Handling Invalid Database IDs Handling Duplicate Database Fields Catching Uncaught Exceptions How Authentication with JWT Works Protecting Tour Routes Authorization: User Roles and Permissions Password Reset Functionality: Reset Token Sending Emails with Nodemailer Sending JWT via Cookie Implementing Rate Limiting

Setting Security HTTP Headers Data Sanitization Preventing Parameter Pollution Server-side Rendering with pug templates Image Uploads Using Multer: Users Resizing Images Adding Image Uploads to Form Uploading Multiple Images: Tours Email Templates with Pug: Welcome Emails Setting Up Git and Deployment