Next.js 13 API Routes Tutorial

preview_player
Показать описание


Links used in this video:

Other videos:

#nextjs #next #js #javascript #api #crud
Рекомендации по теме
Комментарии
Автор

Good video! Many people who have covered NextJS updates haven't covered where the API folder stands in the new directory setup. Many people will finds this video useful.

practicalapplications
Автор

You'are a life saver! I even wanted to go back to express because apis just didn't work

medio_cre
Автор

Great work, makes it easier for me to understand. I did have a problem with query.params[0]. It kept giving me all the values when I was only asking for one. Your example only got you back one params the first time. Thanks for posting this!!!

DouglasJHeuer
Автор

Thanks, I was stumbling on the same thing. Just a thing for people: don't implement the actual backend logic in the /pages/api folder. Treat that folder as the backend router, and import calls to the actual implementions from another folder outside of the /pages/api.

LarsRyeJeppesen
Автор

This is an excellent Next 13 API routes tutorial, thank you 🙏🙏🙏

maskman
Автор

think you my brother, i was very needing it

nbtyxqp
Автор

Ok but I want to return to specific page after post data inside api file, I dont want to show json after send data, then the question is how to redirect to specific page?

isbelmont
Автор

good video only if u have experience with Nextjs. I still don't know how to send a req to api url with my 🔑secret and id unfort

topguy
Автор

thank you very much, I was blocked and in the documentation I could not solve the doubt.

IvanGarcia-gdcp
Автор

"Route Handlers are only available inside the app directory. You do not need to use API Routes (pages) and Route Handlers (app) together, as Route Handlers should be able to handle all use cases." from the nextjs 13 docs. I'm confused

ahmadoa
Автор

But i would say this way of building api's is difficult and it makes maintainance hard.

reconnectingagain
Автор

Good video, but you probably dont need to explain switch statements to people trying to learn api routing

minimumtn
Автор

i created a new project today to find this i'm confused 😂
app
├── api
│   └── hello
│   └── route.ts
├── layout.tsx
├── page.module.css
└── page.tsx

xtz_