In this video, we will create Next.js API Routes using next-connect. We will also show how to have middleware using next-connect for authentication and authorization.
Next-connect has an API similar with express.js which feels familiar to most of us =)
Timeline:
00:00 Introduction
01:43 Show database structure
02:06 Show /api/champions using POSTMAN working for all methods
02:31 Show /api/drivers using switch/case
03:00 Use next-connect for /api/champions
04:44 Setup onNoMatch in next-connect
06:00 Setup onError in next-connect
07:52 Share next-connect handlers across our api routes
08:42 Move from switch/case to next-connect
10:24 Middleware for authentication and authorization
19:48 Conclusion
----
Git Repository: https://github.com/bmvantunes/youtube...
----
Next.js Authentication Tutorial: • Next.js Authentication
----
Next.js API Routes tutorial: • Next.js Tutorial - Part 4 | API Route...
----
HTTP Verbs/Methods description: https://restfulapi.net/http-methods/
----
----
Follow me on:
Twitter: / bmvantunes
Dev.to: https://dev.to/bmvantunes
Website: https://brunoantunes.net
Github: https://github.com/bmvantunes
LinkedIn: / bmvantunes
Смотрите видео Next.js API Routes using next-connect онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Bruno Antunes 13 Июль 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 18,482 раз и оно понравилось 498 людям.