Need Assistance?

support@tutorialshub.in

Route Handlers (Backend APIs)

Building API Endpoints (route.js)

ADVERTISEMENT
Next.js Free Lesson
5 min read
ADVERTISEMENT

Need a custom webhook, mobile app endpoint, or JSON API? Create a file named route.js inside app/api/ and export functions named after HTTP methods (GET, POST, PUT, DELETE).

Remember: a folder can have either a page.jsx or a route.js, never both in the exact same folder.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you