{"id":16377730,"url":"https://github.com/walshydev/workerd-example","last_synced_at":"2025-03-23T03:32:51.406Z","repository":{"id":130663504,"uuid":"542064697","full_name":"WalshyDev/workerd-example","owner":"WalshyDev","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-27T13:05:02.000Z","size":11,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T17:14:25.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"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/WalshyDev.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-27T12:08:05.000Z","updated_at":"2024-10-30T16:27:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"5475adfc-601d-4140-8654-ec46d0fa5d4e","html_url":"https://github.com/WalshyDev/workerd-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalshyDev%2Fworkerd-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalshyDev%2Fworkerd-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalshyDev%2Fworkerd-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalshyDev%2Fworkerd-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WalshyDev","download_url":"https://codeload.github.com/WalshyDev/workerd-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052638,"owners_count":20553162,"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":[],"created_at":"2024-10-11T03:43:52.480Z","updated_at":"2025-03-23T03:32:51.396Z","avatar_url":"https://github.com/WalshyDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Workerd Example\n\nThis is an example Worker which can be ran with workerd\n\nThis example includes bundling a Worker up and using KV (persisting to a `kv` directory)\n\n## Running\n\nTo run simply install the dependencies and run workerd :)\n\nRequests are served at http://localhost:8080 (can be changed in `config.capnp`)\n\n```\n# Install the dependencies (including workerd)\n$ npm i\n\n# Bundle your Worker and start Workerd serving the Worker\n$ npm run dev\n```\n\n## Testing\n\nOnce the Worker is running we can test it!\n\nTo create a redirect do a `POST` to `/create` like so:\n```\n$ curl -X POST -d '{\"slug\": \"test\", \"destination\": \"https://walshy.dev\"}' http://localhost:8080/create\n```\n\nThen to test the redirect simply send a `GET` request to the slug like so:\n```\n$ curl -i http://localhost:8080/test\nHTTP/1.1 302 Found\nContent-Length: 0\nLocation: https://walshy.dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalshydev%2Fworkerd-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalshydev%2Fworkerd-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalshydev%2Fworkerd-example/lists"}