Next.js Example
Next.js 16 App Router, served by next start. Each page checks one feature that depends on how the app is hosted.
- Route Handler — JSON with the server time, PORT and the container that answered; POST echoes its body.
- Server Action — The button calls a function on the server and shows what it returned, without a reload.
- Proxy (middleware) — Redirects to /proxy, which shows the header proxy.ts added to the request.
- ISR — Rendered at most every 30 s; POST /api/revalidate renders it again at once.
- next/image — A 1600 px JPEG served resized as WebP or AVIF through /_next/image.
- Streaming — The page shell arrives at once, the slow part three seconds later in the same response.
- Environment variables — NEXT_PUBLIC_BUILD_MESSAGE inlined at build time, RUNTIME_MESSAGE read per request.