Route Handlers sono il modo dell'App Router per costruire endpoint API — handler HTTP backend che vivono nel tuo progetto Next.js. Li crei con un file route.ts, esportando funzioni nominate secondo i metodi HTTP.
Definire un endpoint
ts
{ , } ;
() {
users = db..();
.(users);
}
() {
body = req.();
user = db..({ : body });
.(user, { : });
}
