{"id":18188883,"url":"https://github.com/mlafeldt/netlify-edge-bootstrap","last_synced_at":"2025-07-02T13:37:15.380Z","repository":{"id":60910963,"uuid":"491071331","full_name":"mlafeldt/netlify-edge-bootstrap","owner":"mlafeldt","description":"Learn how Netlify Edge Functions work under the hood","archived":false,"fork":false,"pushed_at":"2025-06-14T00:06:10.000Z","size":1412,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-14T01:19:49.193Z","etag":null,"topics":["deno","edge-functions","netlify","playground"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlafeldt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-11T10:57:50.000Z","updated_at":"2025-06-14T00:06:13.000Z","dependencies_parsed_at":"2023-09-26T04:48:25.705Z","dependency_job_id":"daf54a84-0a7d-4f6c-b016-c84e2f363957","html_url":"https://github.com/mlafeldt/netlify-edge-bootstrap","commit_stats":{"total_commits":152,"total_committers":2,"mean_commits":76.0,"dds":0.2763157894736842,"last_synced_commit":"55116c1dfbc4b0c4f478bf1241c36bf2112e190c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlafeldt/netlify-edge-bootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fnetlify-edge-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fnetlify-edge-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fnetlify-edge-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fnetlify-edge-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlafeldt","download_url":"https://codeload.github.com/mlafeldt/netlify-edge-bootstrap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fnetlify-edge-bootstrap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263148897,"owners_count":23421275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","edge-functions","netlify","playground"],"created_at":"2024-11-03T03:05:05.762Z","updated_at":"2025-07-02T13:37:15.338Z","avatar_url":"https://github.com/mlafeldt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netlify-edge-bootstrap\n\nThis repo contains the \"closed-source\" [bootstrap code](src/bootstrap) used to initialize the environment of Netlify Edge Functions as well as the [bundler code](src/bundler) used for deploying them to Deno Deploy.\n\nWhile the [Edge Functions API](https://docs.netlify.com/netlify-labs/experimental-features/edge-functions/api/) is decently documented, I was still curious how Netlify actually integrates [Deno](https://deno.land/) as a JavaScript/TypeScript runtime behind the scenes. To that end, I extracted the code and created a [playground](playground) that can run functions locally (similar to `netlify dev`).\n\nI gathered all information contained here by reading the source code of Netlify's [CLI](https://github.com/netlify/cli/tree/main/src/lib/edge-functions) \u0026 [Edge Bundler](https://github.com/netlify/edge-bundler) and tinkering with `deno vendor`.\n\n## Usage\n\n(Make sure to [install Deno](https://deno.land/manual/getting_started/installation) version 1.22 or higher first.)\n\nDownload current bootstrap code to `src` folder:\n\n```console\nmake bootstrap\n```\n\nStart playground webserver:\n\n```console\nmake playground\n```\n\nSend requests to playground:\n\n```console\n❯ curl -H 'x-nf-edge-functions: hello' -H 'x-nf-request-id: 1234' http://localhost:8000\nHello world\n\n❯ curl -H 'x-nf-edge-functions: up,hello' -H 'x-nf-request-id: 1234' http://localhost:8000\nHELLO WORLD\n\n❯ curl -H 'x-nf-edge-functions: up,skip,hello' -H 'x-nf-request-id: 1234' http://localhost:8000\nHELLO WORLD\n```\n\n`x-nf-edge-functions` must contain a list of functions to be run in the given order. Function handlers are defined [here](playground/netlify/edge-functions).\n\n\nBundle functions like Netlify does before deploying to Deno Deploy:\n\n```console\nmake bundle\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlafeldt%2Fnetlify-edge-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlafeldt%2Fnetlify-edge-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlafeldt%2Fnetlify-edge-bootstrap/lists"}