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
Watch video Next.js API Routes using next-connect online without registration, duration hours minute second in high quality. This video was added by user Bruno Antunes 13 July 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 18,482 once and liked it 498 people.