Test EdgeWorkers functions in your sandbox
Use the Sandbox CLI to test your EdgeWorkers functions before deploying.
In order to test your EdgeWorkers code, you need to first create a sandbox and know the EdgeWorker ID. You also need to create a code bundle.
Before you begin
You can use Sandbox to test EdgeWorkers functions locally and iterate before deploying them to the content delivery network.
Run this command to add an
EdgeWorker ID to the sandbox.
akamai sandbox add-edgeworker <edgeworker-id> <edgeworker-tarball>
Use curl or a browser to test the functionality.
Curl: Run this command
curl --header 'Host: www.example.com' http://127.0.0.1:9550/Browser: Open your /etc/hosts file and point the hostname associated with the property configuration to 127.0.0.1, then enter http://<your-hostname>:9550 in your browser.
Run this command every time you update your EdgeWorkers code.
akamai sandbox update-edgeworker <edgeworker-id> <edgeworker-tarball>