Рет қаралды 99,121
En this class 2 you will learn how to create an API from scratch with Express. We will explore the HTTP protocol, how to create routes, and solve common problems. We will also cover HTTPS, handling Status Codes, and headers. Additionally, we will integrate Express, migrate native methods, and work with Middlewares.
▶ Don't miss more live streams at: / midudev
▶ Community Discord: / discord
▶ Repository: github.com/midudev/curso-node-js
0:00 GitHub Repository
0:41 What will we do in the Class?
1:56 LET'S GET STARTED 🤚🤚
3:12 HTTP Protocol (Request and Response)
16:33 Summary
17:33 HTTPS
18:24 CREATING ROUTES
20:24 Solution to avoid server restart
21:08 -watch (experimental)
22:31 UTF-8 solution
23:57 Creating Other Routes
26:20 Status Codes
26:20 Most typical Status Codes
31:29 Alternative to -Watch Nodemon
34:39 Headers
37:30 What is a buffer?
39:27 CREATING API + HTTP METHODS
41:48 Option CORS method
51:28 Using the POST method
58:29 Integrating Express
1:00:22 First steps with Express
1:03:11 Differences between Native and Express
1:04:35 Migrating Native POST
1:07:06 How to Disable x-Powered-By: Express?
1:07:35 Migrating Native GET
1:08:17 404 in Express
1:10:16 Express Middlewares
1:13:25 Example with Code
1:16:03 Real Middleware Example