{"id":35253091,"url":"https://github.com/fastly/compute-starter-kit-typescript-kv-store","last_synced_at":"2026-03-27T04:08:58.230Z","repository":{"id":66166732,"uuid":"589686717","full_name":"fastly/compute-starter-kit-typescript-kv-store","owner":"fastly","description":"Starter kit demonstrating how to use the Fastly KV store from within a TypeScript compute project.","archived":false,"fork":false,"pushed_at":"2026-03-04T00:28:39.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":19,"default_branch":"main","last_synced_at":"2026-03-12T17:54:43.395Z","etag":null,"topics":["compute-starter","fastly-oss-tier1"],"latest_commit_sha":null,"homepage":"https://developer.fastly.com/solutions/starters/","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-16T17:42:52.000Z","updated_at":"2026-03-04T00:28:42.000Z","dependencies_parsed_at":"2024-10-24T22:12:51.174Z","dependency_job_id":"022ce0e2-dc55-41db-b254-44450bec055b","html_url":"https://github.com/fastly/compute-starter-kit-typescript-kv-store","commit_stats":null,"previous_names":["fastly/compute-starter-kit-typescript-kv-store"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fastly/compute-starter-kit-typescript-kv-store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-starter-kit-typescript-kv-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-starter-kit-typescript-kv-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-starter-kit-typescript-kv-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-starter-kit-typescript-kv-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastly","download_url":"https://codeload.github.com/fastly/compute-starter-kit-typescript-kv-store/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-starter-kit-typescript-kv-store/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30942331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-25T20:13:00.360Z","status":"ssl_error","status_checked_at":"2026-03-25T20:04:11.365Z","response_time":80,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["compute-starter","fastly-oss-tier1"],"created_at":"2025-12-30T07:06:40.403Z","updated_at":"2026-03-27T04:08:58.225Z","avatar_url":"https://github.com/fastly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compute Starter Kit TypeScript KV Store\n\nFastly KV Store is a globally consistent key-value storage accessible across the Fastly Network. This makes it possible for your Compute@Edge application to read and write from KV Stores. The application shows how to use Fastly KV Store within a TypeScript Compute@Edge application.\n\n**For more details about other starter kits for Compute@Edge, see the [Fastly developer hub](https://developer.fastly.com/solutions/starters)**\n\n## Understanding the code\n\n### [./src/index.ts](./src/index.ts)\n\nThis is the entry point of the application, an event-listener is attached to the `fetch` event, which calls the application code and include some generic exception handling, which would print any uncaught exception to the stderr and return a response with a HTTP 500 status to the user-agent.\n\n### [./src/app.ts](./src/app.ts)\n\nThis is where the majority of our application code lives. A single async function is exported named `app`, which is the function that recieves the incoming `FetchEvent` and returns a `Response` instance, which will be sent to the user-agent.\n\n## Running the application\n\nTo create an application using this starter kit, create a new directory for your application and switch to it, and then type the following command:\n\n```shell\nnpm create @fastly/compute@latest -- --language=typescript --starter-kit=kv-store\n```\n\nTo build and run your new application in the local development environment, type the following command:\n\n```shell\nnpm run start\n```\n\n## Deploying the project to Fastly\n\nNote that Fastly Services have to have unique names within a Fastly Account.\n\nTo create and deploy to a new Fastly Service run the command and follow the instructions:\n\n```shell\nnpm run deploy\n```\n\nThat is it, we now have a Fastly Service, a Fastly KV Store and have them linked together!\n\nYou can view real-time logs for the Fastly Service by running:\n```shell\nnpx fastly log-tail\n```\n\n## Adding entries to the KV Store\n\nIt is possible to add key-value pairs to an KV Store using the Fastly CLI like so:\n```shell\nnpx fastly kv-store-entry create --store-id=$FASTLY_KV_STORE_ID --key-name=$KEY --value=$VALUE\n```\n\nFor example, here is how you could add to the KV Store named `my-store` a key named `readme` whose value is the contents of `README.md`:\n```shell\nnpx fastly kv-store-entry create --store-id=\"$(npx fastly kv-store list --json | jq -r '.Data[]|select(.Name==\"my-store\").ID')\" --key-name=\"readme\" --value=\"$(cat README.md)\"\n```\n\n## Security issues\n\nPlease see our [SECURITY.md](SECURITY.md) for guidance on reporting security-related issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastly%2Fcompute-starter-kit-typescript-kv-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastly%2Fcompute-starter-kit-typescript-kv-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastly%2Fcompute-starter-kit-typescript-kv-store/lists"}