Chapter 07
Route handlers, Proxy and request hooks
Request-level code in Next.js:route.ts handlers, proxy.ts and why it replaced middleware, why Proxy is not an authorization layer, after for work that runs after the response, and instrumentation.ts for request errors.- 010When do you write a route handler instead of a Server Action?medium
- 020What is
proxy.ts, what should run there, and why wasmiddlewarerenamed?medium - 030Why is Proxy not enough for authorization?hard
- 040What does
afterrun, and when does it run relative to the response?medium - 050What do
instrumentation.tsandonRequestErrorhook into?medium