Environments
Environments let you configure feature flags differently for development, staging, and production. Each environment has its own flags and targeting rules, so you can test safely before going live.
Default environments: Every project starts with development and production. Add more (like staging) as needed.
Why use environments?
- Test features safely in development
- Validate in staging before production
- Different configurations per environment
- Isolated targeting rules
Creating an Environment
- Go to Project Settings → Environments
- Click “Add Environment”
- Enter name and slug (e.g., “Staging” /
staging) - Add optional description
- Click “Save”
When evaluating flags, specify which environment to use:
const client = new SupaClient({
apiKey: 'your-key',
environment: 'production', // or 'development', 'staging', etc.
context: { userID: '123' },
})Last updated on