The API routes provided by Next.js give you a means to build your API. Each file in the pages/api subdirectory is mapped to /api/* and treated more like an API endpoint than a page.
The API routes provided by js provide a way to build your API. Each file in the pages/api subdirectory is mapped to /api/* and treated more like an API endpoint than a page. Because they are server-side only bundles, they don't raise the size of your client-side bundle. An API route won't work until you export a function as default (also known as a request handler). The following arguments are thus accepted by this function:
To build your whole API for new applications, use API Routes.
To know more about API click here:
https://brainly.com/question/27852304
#SPJ4