Route Handlers are the App Router's way to build API endpoints — backend HTTP handlers that live in your Next.js project. You create them with a route.ts file, exporting functions named after HTTP methods.
Defining an endpoint
{ , } ;
() {
users = db..();
.(users);
}
() {
body = req.();
user = db..({ : body });
.(user, { : });
}
