

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 2
This page cannot be seen from the preview
Don't miss anything!


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