All guides
Basics5 min read

Ship your first flag

The first integration should be boring. One server-side runtime key, one environment, one flag, and one call site is enough to prove the whole path in production.

1. Create the flag

In the console, create a boolean flag — say new-checkout — and leave it off in every environment. Nothing changes in your app yet, which is exactly what you want.

2. Evaluate it in code

Install the server SDK, initialise one client per process with a runtime key, and wrap the new behaviour in a check. Always pass an explicit default so the call site is defined before the first snapshot arrives.

  • Boolean, string, number, and object flags each carry a typed default.
  • A missing flag resolves to the default rather than throwing.
  • Evaluation is local, so checking a flag on every request is free.

3. Turn it on for yourself

Add a targeting rule that matches only your own user id, then flip the flag on. You are now releasing to exactly one person. When it looks right, widen the rule — a percentage, a plan, an account — until it reaches everyone.