/flags-example

An example showing how to use feature flags in Next.js

Primary LanguageJavaScriptMIT LicenseMIT

This is a Next.js project bootstrapped with create-next-app to show @happykit/flags usage.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

.env.local

Usually you wouldn't commit .env.local to the repository. It's done here to show the setup as the contained client id is public anyhow.

You can replace it with your own client id if you want to see feature toggle features. Sign up for free at https://happykit.dev/signup and create a project. Then, in your project, go to "Settings" > "Keys" and copy your "Development Flags Id" under "Flags".

Learn More

To learn more about HappyKit Flags, take a look at the following resources: