Gets a folder that contains API endpoints for a Next.js application.
These API endpoints act as Express-like route-handlers.
It matches both the Pages Router (pages/api/) Next.js 12 or earlier and
the App Router (app/api/) Next.js 13+ structures.
Import path
import javascript