Split Integration example

R
Renaudil y a 2 jours
0

Description

Learn to use Split, a feature delivery platform that powers feature flag management, software experimentation and continuous delivery.

npx boilerapp ab-testing-split

文档

A/B Testing with Split

Split is a feature delivery platform that powers feature flag management, software experimentation and continuous delivery.

Demo

https://ab-testing-split.vercel.app

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel:

Deploy with Vercel

Clone and Deploy

Execute create-next-app with pnpm to bootstrap the example:

pnpm create next-app --example https://github.com/vercel/examples/tree/main/edge-middleware/feature-flag-split feature-flag-split

You'll need to have an account with Split. Once that's done, copy the .env.example file in this directory to .env.local (which will be ignored by Git):

cp .env.example .env.local

Then open .env.local and set the environment variables to match the ones in your Split dashboard. Your keys should be available under Workspace settings - API Keys, in the admin settings of your organization.

Set up environment variables

Copy .env.example to .env.local:

cp .env.example .env.local

Then fill it with the following information:

  • Log in to the Split console and navigate to Profile -> Admin Settings -> API Keys -> SDK API Keys to retreive your SDK API Key.

  • Install the Split Vercel Integration for your project. Then fill in .env.local with the provided Edge Config Item Key.

  • You can find the Edge Config Connection String on vercel.com -> Storage -> [Your Edge Config] -> Projects. You can click Connect Project if your Edge Config is not connected to any project yet. This will automatically create a token for you and set it up as an environment variable on your project. Note that you still need to provide it to your .env.local file. Otherwise, click on Tokens in the sidebar and find the token you want to use. Then click on the three dots of and select Copy Connection String.

  • You also need to create feature flags called New_Marketing_Page and New_About_Page. You can set the user targeting to Joe and Bobby in whatever configuration you'd like as those users are used by this example.

Next, run Next.js in development mode:

pnpm dev

Deploy it to the cloud with Vercel (Documentation).

Prix

Gratuit

FREE

评论 (0)

常见问题

常见问题解答 (FAQ)

有问题?我们有答案。如果您找不到想要的答案,请随时联系我们。

Boilerapp 是一个专门用于分享 Boilerplates、入门套件(Starter Kits)和项目模版的开发者社区平台。我们的目标很简单:为您节省初始配置(Setup)的时间,让您可以专注于真正重要的代码。无论您是在寻找简单的代码库还是完整的 SaaS 项目,都能在这里找到。

还有其他问题?

我们的团队随时为您提供帮助。联系我们,我们将尽快回复。

Split Integration example | BoilerApp