API Routes v13+
Changes vs v12
Page Router
Route Handlers can be nested anywhere inside the app
directory, similar to page.js
and layout.js
.
But there cannot be a route.js
file at the same route segment level as page.js
.