Skip to content

optimizely/next-js-starter-kit

Repository files navigation

Optimizely Next.js Starter Kit

The goal of this repo is to get you to a running NextJS app with Optimizely React SDK as fast as possible.

Prerequisites

To run the application, you need to have the following installed:

  • Visual Studio Code (VSCode)
  • Install extension Dev Containers
  • Docker or Docker Desktop

Getting Started

To get started with the application, follow these steps:

  1. Open Visual Studio Code and press Ctrl + Shift + P (or Cmd + Shift + P on macOS) to open the command palette. Type "Dev Containers: Clone Repository in Container Volume" and press Enter.

  2. Enter the repository address https://github.com/optimizely/next-js-starter-kit.

  3. If asked, choose the main branch.

  4. Once the repository is cloned and opened in the dev container, run the project by opening a terminal in Visual Studio Code (press Ctrl + ` (or Cmd + ` on macOS) and execute the following command:

    npm run dev
  5. Click the link to the http://localhost:3000/ address to open a browser to the running Next app and seeing the quick Start information on the home page.

To Exit

  1. Type Ctrl + C in the terminal panel where your npm run dev was running.
  2. Press Ctrl + Shift + P (or Cmd + Shift + P on macOS) to open the command palette.
  3. Select the "Remote: Close Remote Connection" command, which will close the project and exit the running container.

What To Do From Here

Take a look at the following Optimizely resources to support experimentation and feature flagging for your Next project:

Other Optimizely SDKs