Add custom middlewares to your Next.JS API | Middleware using Higher-order function

preview_player
Показать описание
In this video, we will be seeing how we can add custom middleware to our Next.JS API routes.

Useful links:

Chapters:
0:00 Introduction to Middlewares using Express
2:13 Adding middleware to Next.JS API route
3:05 Higher-Order Functions
5:10 Implementation of middleware
7:40 Adding multiple middlewares
Рекомендации по теме
Комментарии
Автор

This is the only video that cleared my doubts....
surprisingly there are not many videos on next.js middlewares despite it being a famous framework

vikhyatverma
Автор

higher order function example really helped

cr
Автор

thanks for giving me a feel of being a color blind.

abdulshaikh
Автор

Very underrated channel! Wish you luck for your future journey... Subscriber++

greywanderer
Автор

This video will make my code look more professional. Love it 😍

sarawutkengkan
Автор

Very well structured video. Plenty of useful information. Thanks!

dMDzn
Автор

nice and very well explained but I am confused about how can i implement multiple middlewares in same API route

zubairwasti
Автор

Hi Mayank, thank you for making this amazing course!
I just have a question.
I make a request to the login API and I receive the refresh token that is in the cookie and the access token that is in the response body. Now how should I handle the access token on the client side(next js)? If I store this in a global state like context API, then I don't have access to that state in the getServerSideProps function, and I can't set it in the request.header.authorization because getServerSideProps run on server side!

Mike-xrfk
Автор

Is this video old or something? In next js i can't access the api folders.

cectwsr