Encore and Vercel have partnered to enable full-stack Preview Environments that span both backend and frontend. The core challenge was that Vercel's preview environments were tied to individual commits without PR number context, making it impossible to automatically route frontend previews to the correct backend environment. After a quick collaboration with Vercel's CEO, a new environment variable `VERCEL_GIT_PULL_REQUEST_ID` was introduced. Encore's generated clients now use this variable to automatically route API calls to the matching backend Preview Environment, enabling end-to-end testing of changes across the full stack with minimal configuration.

5m read timeFrom encore.dev
Post cover image
Table of contents
Preview Environments to the rescuePreviewing a better, full stack-er future
26 Impressions