From abd24af3d3966fcd057fbfde8d6e8f4612f11e8b Mon Sep 17 00:00:00 2001 From: Adam Wootton Date: Tue, 20 Aug 2024 09:53:15 -0400 Subject: [PATCH] add a section about linking edge config --- docs/integrations/vercel-edge-config.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/integrations/vercel-edge-config.md b/docs/integrations/vercel-edge-config.md index 85adcc45..40d02f6b 100644 --- a/docs/integrations/vercel-edge-config.md +++ b/docs/integrations/vercel-edge-config.md @@ -43,11 +43,18 @@ If you don't have an Edge Config already set up, one will be created for you wit After you have made your selections, hit "Submit" to finish configuring the integration. -### Setup SDK +### Connect a Vercel Project +To use the integration in your application, you must connect the desired Edge Config in Vercel to the Vercel project where you will be running DevCycle. To do so, navigate to the "Storage" tab in the Vercel Dashboard, click on the Edge Config you want to connect, and visit the "Projects" section in the sidebar. See the [Vercel docs](https://vercel.com/docs/storage/edge-config/get-started#connect-your-vercel-project) for more information + +Once a project has been connected, an environment variable called EDGE_CONFIG will be set in that project which can be used in the following steps to connect to your Edge Config. +In order to set this variable locally for testing, make sure to pull down the latest environment variables using the Vercel CLI by executing the following in your project's directory: +`vercel env pull` -If you haven't already installed the DevCycle [Node.js](https://docs.devcycle.com/sdk/server-side-sdks/node/) or [Next.js](https://docs.devcycle.com/sdk/server-side-sdks/nestjs/) SDK you can follow the installation and usage guides for those SDKs in our [documentation here](https://docs.devcycle.com/sdk/). You can also find helpful setup information like where to find SDK keys in our [Quickstart Tutorial](https://docs.devcycle.com/introduction/quickstart). +If you do not have the Vercel CLI set up for this project, [follow their steps](https://vercel.com/docs/cli/project-linking) to link the CLI to your Vercel Project + +### Setup SDK -Make sure the Edge Config you would like to use has been connected to the project where you’re planning to run the DevCycle code. Vercel's documentation for this can be found [here](https://vercel.com/docs/storage/edge-config/get-started#connect-your-vercel-project). +If you haven't already installed the DevCycle [Node.js](https://docs.devcycle.com/sdk/server-side-sdks/node/) or [Next.js](https://docs.devcycle.com/sdk/server-side-sdks/nestjs/) SDK you can follow the installation and usage guides for those SDKs in our [documentation here](https://docs.devcycle.com/sdk/). You can also find helpful setup information like where to find DevCycle SDK keys in our [Quickstart Tutorial](https://docs.devcycle.com/introduction/quickstart). In order to use the integration in a DevCycle SDK, you must install the `@devcycle/vercel-edge-config` package and provide it during SDK initialization. Using that package requires the `@vercel/edge-config` package to be installed as well: