How this page works
Each card shows one Amplify feature at work. The page itself is cached, and the live values come from a server function.
This page is cached
A function rendered this page once, and everyone gets that cached copy. It rebuilds every minute, or right away when you revalidate it. That’s why the link opens fast.
- HTML built
- auto refresh
- …
Server function, every request
The live values on this page come from /api/live, a function that runs on every request. Call it again to see the time change.
Code before every request
proxy.js runs before the page. It adds a timestamp to the request, and the function reads it back.
Configuration without code
Set them per environment with amplifygen3 var set. Change one, redeploy, and the value here changes.
Preview and production
Every app gets a preview and a production environment. Each pull request also gets its own preview URL.
Viewer facts from the CDN
The CDN in front of the function passes along where each visitor is. This is what it knows about you.