Next.js Tutorial: How to Add Middleware in Next.js API Routes

Опубликовано: 25 Февраль 2025
на канале: Skillthrive
29,437
565

In this video you will learn a framework for writing Next.js middleware so you can do things like protect your API routes from unauthenticated users, check user permissions, and much more.

🗂 CODE 🗂

https://gum.co/xvRggj

⏰ TIMESTAMPS ⏰

Introduction: 0:00

Before: Express Middleware: 0:40

Now: Next.js Middleware: 4:30

withProtect Middleware Demo: 7:12

withRoles Middleware: 8:25

withRoles Middleware Demo: 10:33

🔗 HELPFUL RESOURCES 🔗

Next.js in 100 Seconds:    • Next.js in 100 Seconds // Plus Full B...  

Next.js Crash Course 2021:    • Next.js Crash Course  

👋 FOLLOW US 👋

Instagram:   / skillthrive  

#Nextjs #WebDev #WebDevelopment