Getting Started

Quick Start (5 Minutes)

2 min read

Get up and running with FlagPilot in 5 minutes by following this simple integration guide.

1. Create Your Flag

Log in to the FlagPilot dashboard, click Create Feature Flag, set the key to my-first-flag, and set the default state to enabled in development.

2. Install SDK & Config Credentials

Install the Node.js SDK:

Terminal
npm install @flagpilot/node

Add your environment variable to a .env file:

.env
FLAGPILOT_SECRET_KEY=fk_secret_xxxx

3. Evaluate the Flag in Code

Write code to evaluate your flag status:

index.ts
import { FlagPilot } from '@flagpilot/node';

const flagpilot = new FlagPilot({
  apiKey: process.env.FLAGPILOT_SECRET_KEY,
  environment: 'production'
});

await flagpilot.initialize();

const enabled = await flagpilot.evaluate('my-first-flag', { userId: 'user_123' });
if (enabled) {
  console.log("Flag is enabled!");
}

4. Verify Evaluated Metric Logs

Run your code. Then return to the dashboard, select the flag, and check that active evaluation counters immediately increment inside the flag's details panel.

FAQ

How does Quick Start (5 Minutes) interact with local caches?

Configurations are synced down using Edge Config or fallback REST triggers. The client automatically reads evaluations in-memory, resulting in sub-millisecond local evaluation times.

Where can I obtain support for Quick Start (5 Minutes)?

You can open a support ticket in your dashboard, check the community roadmap, or consult the FlagPilot Platform Status page.

Was this page helpful?