.env.local.example
{' '}
+ to .env.local
and fill in the values from your
+ GrowthBook SDK Connection.
+ + Finally, create these two feature flags in your GrowthBook + account. These will be referenced in the examples below. +
+feature1
, Type:{' '}
+ Boolean (true/false)
+ feature2
, Type: String
+ middleware.ts
file that ensures a UUID cookie
+ is available before the first request is processed. This UUID is
+ shared between the client and server and is used to assign consistent
+ feature values to visitors when a percentage rollout or experiment is
+ running.
+ src/lib/growthbookServer.ts
). For faster updates, there
+ is a POST /revalidate
route handler that can be triggered
+ from an SDK Webhook in GrowthBook.
+ GrowthBookTracking
client component defined in{' '}
+ src/lib/GrowthBookTracking
.
+ POST /revalidate
+