Uses Optimizely FullStack with the Optimizely Edge SDK to do basic experimentation and bucketing within a Cloudflare worker.
-
Install Wrangler CLI.
-
Create a project
wrangler generate projectname https://github.com/optimizely/cloudflare-worker-template-
Add
account_idinwrangler.toml. This is found within the Workers page in Cloudflare -
Install packages
npm install-
Within
src/index.js, update the OptimizelysdkKey,flagKeyanduserId -
Run the worker locally using
wrangler dev