mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
preferredRegion Test
This test demonstrates the successful implementation of preferredRegion configuration support for Node.js runtime in Next.js App Router.
Test Structure
app/api/test/route.ts- Node.js runtime route handler withpreferredRegion = "iad1"andmaxDuration = 100app/api/test-edge/route.ts- Edge runtime route handler withpreferredRegion = "iad1"andmaxDuration = 100
What the Test Shows
✅ Node.js Runtime (NOW WORKS!)
- Route handler exports
preferredRegion = "iad1"andmaxDuration = 100 - Gets processed and stored in
functions-config-manifest.jsonas:{ "/api/test": { "maxDuration": 100, "regions": ["iad1"] } } - Deployment platforms can now read
regionsfor Node.js runtime
✅ Edge Runtime (CONTINUES TO WORK)
- Route handler exports
preferredRegion = "iad1"andmaxDuration = 100 - Gets processed and stored in both manifests:
functions-config-manifest.jsonunderfunctions["/api/test-edge"]middleware-manifest.jsonunderfunctions["/api/test-edge/route"]