Next.js Discord

Discord Forum

Trying to get api routes to work.

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
Hello, Im new to nextjs and am trying to create a simple crud application involving the api routes. I tried testing it in thunderclient but im getting these errors and when i try to open up the page route of my api it says page not found.

1 Reply

Saluki
You need to use the new API handlers if you're defining your routes in the /app/api folder. I suggest you familiarize yourself with its syntax here: https://nextjs.org/docs/app/building-your-application/routing/router-handlers