This is the default optimizely starter kit for fastly edge workers. This template provides an npm package with starter code and required dependencies.
-
Create a new folder and initialize a fastly compute service using fastly cli from this template.
fastly compute init --from https://github.com/optimizely/fastly-compute-starter-kit
-
Follow the wizard and provide name, description and other information.
-
If you want to use an existing fastly service, add your
service_id
tofastly.toml
. -
Update your optimizely
sdkKey
andflagKey
insrc/index.js
. -
To build and publish.
fastly compute publish
-
To see logs.
fastly logs tail