---
updatedAt: 2026-04-20T19:21:10.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/edgeworkers/llms.txt
---

# Create the Hello World code bundle

Your Hello World code bundle must contain the `main.js` and `bundle.json` files.  See [code bundle format](https://techdocs.akamai.com/edgeworkers/docs/code-bundle-format) for more information.

1. Create a folder on your computer for the code bundle files.

2. Go to the  [EdgeWorkers GitHub repository](https://github.com/akamai/edgeworkers-examples) and download the `main.js` and `bundle.json` files from the helloworld project or create them using the values below.

3. Use the Hello World code sample to create the JavaScript source in a file called `main.js`.

[block:callout]
{
  "type": "success",
  "body": "When you start creating your own EdgeWorkers functions you can use the built-in [Code bundle editor](https://techdocs.akamai.com/edgeworkers/docs/code-bundle-editor) to validate and edit your `bundle.json` and `main.js` files."
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "// Hello World Example\n\nexport function onClientRequest(request) {\n  request.respondWith(\n      200, {},\n      '<html><body><h1>Hello World From Akamai EdgeWorkers</h1></body></html>');\n}\n\nexport function onClientResponse(request, response) {\n  response.setHeader('X-Hello-World', 'From Akamai EdgeWorkers');\n}",
      "language": "javascript"
    }
  ]
}
[/block]

[block:callout]
{
  "type": "info",
  "body": "Each time you want to activate a new EdgeWorkers code bundle or update an existing EdgeWorkers code bundle you need to create a new version number."
}
[/block]

4. Compress the files into a code bundle.

[block:code]
{
  "codes": [
    {
      "code": "tar -czvf filename.tgz main.js bundle.json",
      "language": "shell"
    }
  ]
}
[/block]

5. Next, follow these instructions to [deploy the Hello World code bundle](https://techdocs.akamai.com/edgeworkers/docs/deploy-hello-world-3).

# Sibling pages

* [Create an EdgeWorker ID](https://techdocs.akamai.com/edgeworkers/docs/create-an-edgeworker-id-3.md)
* [Add the EdgeWorkers behavior](https://techdocs.akamai.com/edgeworkers/docs/add-the-edgeworkers-behavior-3.md)
* [Deploy Hello World](https://techdocs.akamai.com/edgeworkers/docs/deploy-hello-world-3.md)
* [Test Hello World](https://techdocs.akamai.com/edgeworkers/docs/test-hello-world-3.md)