proxy.ts, route handlers and deployment
Comes up in: React, Frontend system design
This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.
What it covers
proxy.tsreplacesmiddleware.ts(Next 16, Node runtimemiddleware.tsis deprecated but still works for Edge)- route handlers
- environment variables (server vs
NEXT_PUBLIC_) - image and font optimisation
- Turbopack default
- deploying to Vercel vs other hosts (adapters, OpenNext for Cloudflare)
Words you will know
What you will practise
- auth redirect in proxy.ts
Interview questions this answers
- What replaced
middleware.tsin Next.js 16 and why?