API Routes with Next.js 14 - Course part 10

  Рет қаралды 110,260

Codewithguillaume

Codewithguillaume

Күн бұрын

Пікірлер: 90
@codewithguillaume
@codewithguillaume Жыл бұрын
Quick note: I've made a mistake, method is not in header but over header in fetch call 🚀
@codewithguillaume
@codewithguillaume Жыл бұрын
For QUERIES: async function GET(req:NextRequest){ console.log(req.nextUrl.serachParams.get("keyword")) }
@AmodeusR
@AmodeusR 9 ай бұрын
Thanks, this video helped me a lot. Not even the official NextJS focumentation had a proper explanation of how to make routes and such.
@briancooper1789
@briancooper1789 2 ай бұрын
Excellent tutorial! I've watched several videos about both Next JS APIs, and server requests in general. This one is by far the best I've seen for both topics.
@sarhan_104
@sarhan_104 Жыл бұрын
Explained more in 9 minutes than 4 hours big project video, thanks a lot guillaume
@LyleLundy
@LyleLundy 9 ай бұрын
Very helpful, thanks! The official Next docs are a lot to read through. So this is very helpful to have it in quick video format. Very knowledge packed video!
@codewithguillaume
@codewithguillaume 9 ай бұрын
Thanks my friend ! I’ll keep improving
@clickbaitpolice9792
@clickbaitpolice9792 2 ай бұрын
you've earned a sub mate. I've been so scared of all this postman and api stuff. you made it super simple
@ansarqazi4377
@ansarqazi4377 8 ай бұрын
Hey, thanks mate. I've been finding the solution to some error related to API routes & your video literally solved it for me. Thanks a lot. Stay blessed! Highly appreciate your work!
@yipmong
@yipmong Ай бұрын
Thank you so much, you saved me from alot of stress after goin through the documentations, copilot and chatgpt couldnt solve the issue until i stomped on your channel
@WinchesterD
@WinchesterD 8 ай бұрын
Thanks for the explanation. It's strange that right now, in official documentation API routes are covered only for "pages router", nothing said about App router, but however, you did well showing good use cases.
@georgesmaroun1406
@georgesmaroun1406 Жыл бұрын
Excellente video Guillaume! Merci!
@codewithguillaume
@codewithguillaume Жыл бұрын
👍😉
@Devin-tf1es
@Devin-tf1es 7 ай бұрын
Thank you so much, I felt like I was going insane trying trying to figure out nextjs' api routes. The first main problem was realizing that you have to name each file for folder-based routes, as route.ts | js
@codewithguillaume
@codewithguillaume 7 ай бұрын
Nice !
@PetriikVx
@PetriikVx Жыл бұрын
Thanks so much Guillaume, after hours of searching, this video solved my problem!
@MertMusaTemel
@MertMusaTemel 6 ай бұрын
Thanks a lot mate, very informative and you get a new subscriber
@codewithguillaume
@codewithguillaume 6 ай бұрын
Thanks man!
@NickTub3
@NickTub3 7 ай бұрын
Thank you so much!! A few minutes of my time watching this solved hours worth of troubleshooting.
@codewithguillaume
@codewithguillaume 7 ай бұрын
Thanks my friend ! Checkout my masterclass coming soon
@atejap
@atejap Жыл бұрын
Please, keep doing this great king of job. Tks
@johnmuku1773
@johnmuku1773 6 ай бұрын
Thanks for this. This helped more than the docs
@codewithguillaume
@codewithguillaume 6 ай бұрын
Nope my friend
@clasicalsingingfans8808
@clasicalsingingfans8808 8 ай бұрын
that one video talks no BS straight to the point. Thanks, Subscribed you!
@jeremy0x
@jeremy0x 5 ай бұрын
This was super helpful. Thanks Guillaume! Great video ✨
@efratywestchester9291
@efratywestchester9291 5 ай бұрын
thank you, finally someone who explains well!!!
@lrnngman2942
@lrnngman2942 Жыл бұрын
Bro your teaching skill is amazing even I don't understand English
@codewithguillaume
@codewithguillaume Жыл бұрын
Thanks bro! See you soon and subscribe if you didn’t yet !
@DynamicCorp242
@DynamicCorp242 9 ай бұрын
Vraiment
@jdm4657
@jdm4657 10 ай бұрын
EXCELLENT video. It finally is starting to make sense to me. Next time do a video with Prisma so I can follow
@JohnKimani-d6z
@JohnKimani-d6z 5 ай бұрын
Very clear explanation. Had to subscribe.
@badis6717
@badis6717 Жыл бұрын
This is extremely accurate! I didn't find any simple short video that explains rest api in next js, and here we are i found your video and its also new. I thanks you alot ❤ I recommend creating a video or playlist where you explain how to make full rest api with crud, images, files, auth and db
@badis6717
@badis6717 Жыл бұрын
Or you know , don't use db or external packages, instead use json files So that it remain a next next tutorial xD
@codewithguillaume
@codewithguillaume Жыл бұрын
Everything inside Next.js 13 or with another backend framework? 🥰 thanks for comments my friend
@badis6717
@badis6717 Жыл бұрын
@codewithguillaume next.js 13, in the style of this great video, but more full
@toomanyarguments
@toomanyarguments Жыл бұрын
With server-actions, do we still need api routes?
@zyx8463
@zyx8463 10 ай бұрын
thanks this video helped a lot
@elhadi9886
@elhadi9886 9 ай бұрын
very well explained and helpful, Thanx bro
@GamingWithLag
@GamingWithLag 4 ай бұрын
Thanks for the video. I did not find the context thing anywhere else which I needed
@tamerahmed9860
@tamerahmed9860 10 ай бұрын
Thank you! clear explantion as always
@codewithguillaume
@codewithguillaume 10 ай бұрын
Thanks my friend
@ssojyeti2
@ssojyeti2 9 ай бұрын
Great, concise explanation thanks!
@unnamedcodes
@unnamedcodes 7 ай бұрын
You just got yourself a new subscriber. ❤
@codewithguillaume
@codewithguillaume 6 ай бұрын
Welcome my friend 🙌
@LorraineCai
@LorraineCai 7 ай бұрын
Thanks!! You saved my life!!!
@haraldlons
@haraldlons 11 ай бұрын
Really good video!
@codewithguillaume
@codewithguillaume 11 ай бұрын
Thanks my friend it means a lot
@fre6090
@fre6090 11 ай бұрын
how would I write unit tests for a function like this?
@edutechpty
@edutechpty 11 ай бұрын
Thanks a lot!
@UAng-ro9kt
@UAng-ro9kt Жыл бұрын
Thanks for sharing, very helpful
@abe6615
@abe6615 4 ай бұрын
What is the site he's using to monitor the api data?
@anthonyfarias321
@anthonyfarias321 Жыл бұрын
The current docs does not explain this, they explain something that does not work. Use handlers
@codewithguillaume
@codewithguillaume Жыл бұрын
True they should update it
@muthupandideivamsanmugam1774
@muthupandideivamsanmugam1774 8 ай бұрын
thankyou for teaching sir
@VishalSingh-ls4re
@VishalSingh-ls4re 5 ай бұрын
"That's what i'm looking for. Thanks ."
@ionutcirja7121
@ionutcirja7121 11 ай бұрын
Does next have any type for context? I'm talking about the api context. Couldn't find anything in their docs. Thanks
@codewithguillaume
@codewithguillaume 11 ай бұрын
Good question probably ask on Twitter on Nextjs community
@brandonm8385
@brandonm8385 2 ай бұрын
Thanks! I wish I found this a little earlier lol. It is difficult finding good examples on v14, especially with dynamic routes.
@lorddesert
@lorddesert Жыл бұрын
Simple and straight to the point. Love it. Thank you so much!
@xmaxfuture
@xmaxfuture 11 ай бұрын
great tut
@codewithguillaume
@codewithguillaume 11 ай бұрын
Thanks my friend
@maxkosh4839
@maxkosh4839 3 ай бұрын
just one question: why? Why do we need this API if we can do like anything in server components?
@codewithguillaume
@codewithguillaume 3 ай бұрын
Server components / API are 2 différents approaches. Depends on how you want to architecture your project !
@bikibalami
@bikibalami 27 күн бұрын
Took a whole next.js bootcamp. Never once was mentioned that the api folder works like this. Like its an active running server. Thats why my app was not building cause i just treated it as functions to fetch data from servers.
@webmandman
@webmandman Жыл бұрын
can you explain export const dynamic = 'force-dynamic'; and the build process. from what I found out today that route will be prerendered in the build process because its a static route. I had to use the 'force-dynamic' const to make it a dynamic rooute. ofcourse now I'm searching the web to figure out why my response in production is an old version. in localhost:3000 if i update my sql query to pull different data, the route response will reflect that updated data, but not in production. kinda frustrating its not working like a traditional PHP request.
@arvindknit31
@arvindknit31 5 ай бұрын
Hi dear, can you please tell me which AI tool you are using?
@PandiyanM
@PandiyanM 25 күн бұрын
Well and clear.
@ohmegatech666
@ohmegatech666 3 ай бұрын
OK but how do you call the API request in production once you build to Vercel? I just get a HTML response saying Authentication Required. How do you authenticate an API call from Postman to a Next app?
@AlessiaCaraFans
@AlessiaCaraFans 6 ай бұрын
how do you call async await inside client compoenent i thought it s not possible , only if it s a server component ?
@AndresMartinez-se9zl
@AndresMartinez-se9zl 6 ай бұрын
Hey, what is the difference between api routes and route handlers and which one might you use in next js 14?
@djchoodaofficial
@djchoodaofficial Жыл бұрын
In case when we need to get only one user by params(id), you fetch all users and then find selected user. Is this good because we can have more than 1000 users and our performance would be bad if we fetch that number of users.Maybe is better with RESP API to filter call to backend and get only that user
@codewithguillaume
@codewithguillaume Жыл бұрын
Yep you can do this. This was just an example here
@itsRahul-dd4xm
@itsRahul-dd4xm 5 ай бұрын
Thankyou bro
@TahaECHCHOUAL
@TahaECHCHOUAL 9 ай бұрын
thanks
@manassesraimundo
@manassesraimundo 5 ай бұрын
how to create an API with JWT authentication in Nextjs
@dominikyszkowski7663
@dominikyszkowski7663 11 ай бұрын
How to use this api route inside the nextjs app. for example im on page.tsx and i want under click button call post method ?
@sergiohidalgorobles8351
@sergiohidalgorobles8351 Жыл бұрын
just that I was looking
@AbuBakr1
@AbuBakr1 8 ай бұрын
How do i implement API authentication? Sending request from postman for protected route
@tandoku9133
@tandoku9133 Ай бұрын
Why is localhost:3000/api can access pages/api/route.ts? I thought it would be localhost:3000/api/route. Sorry Im confused.
@techjdx
@techjdx 3 ай бұрын
Thanks you .
@adammuhtarif
@adammuhtarif 9 ай бұрын
When i depoloy the app it's a problem of cors
@감기여요
@감기여요 Жыл бұрын
What if I use js instead of react?
@codewithguillaume
@codewithguillaume Жыл бұрын
You can !
@PeriklesPeriklesoglu
@PeriklesPeriklesoglu 10 ай бұрын
thank you
@codewithguillaume
@codewithguillaume 10 ай бұрын
Enjoy my friend !
@patrikmeijer7437
@patrikmeijer7437 4 ай бұрын
Thanks for mentioning that the file has to be named route.ts...
@codewithguillaume
@codewithguillaume 4 ай бұрын
No problem man
@SalmanIqbal-kr8mh
@SalmanIqbal-kr8mh 3 ай бұрын
Dear Sir you fetch external api can you make small video that create custom api in api folder and fetch internal api and show in browser just 3 or 4 items fetch i tried alot of videos everyone fetching external apis only 1 youtuber create custom api and fetch internal api but i donot understand can you make?
@alisalami1644
@alisalami1644 10 ай бұрын
i love you u save me
Fonts with Next.js 14 - Course part 11
5:34
Codewithguillaume
Рет қаралды 14 М.
I'VE MADE A CUTE FLYING LOLLIPOP FOR MY KID #SHORTS
0:48
A Plus School
Рет қаралды 20 МЛН
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН
Next.js Server Actions...  5 awesome things you can do
7:51
Beyond Fireship
Рет қаралды 287 М.
Next.js App Router: Routing, Data Fetching, Caching
14:32
Vercel
Рет қаралды 341 М.
Next js Tutorial for Beginners | Nextjs 13 (App Router) with TypeScript
1:02:55
Programming with Mosh
Рет қаралды 796 М.
Fetching Data Doesn't Get Better Than This
6:58
Josh tried coding
Рет қаралды 143 М.
NextJS 13 API Routes: Better Than Expected!
15:05
Josh tried coding
Рет қаралды 113 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,6 МЛН
the most important Next.js features to learn (in 8 minutes)
8:26
Web Dev Cody
Рет қаралды 72 М.
Is Next.js 15 any good? "use cache" API first look
8:16
Beyond Fireship
Рет қаралды 133 М.
All 29 Next.js Mistakes Beginners Make
1:45:10
ByteGrad
Рет қаралды 161 М.
I'VE MADE A CUTE FLYING LOLLIPOP FOR MY KID #SHORTS
0:48
A Plus School
Рет қаралды 20 МЛН