{"id":23109712,"url":"https://github.com/clydedz/shorturl-cloudflare-workers","last_synced_at":"2025-08-16T18:32:32.991Z","repository":{"id":39750940,"uuid":"414087124","full_name":"ClydeDz/shorturl-cloudflare-workers","owner":"ClydeDz","description":"Demo Cloudflare Worker created for a Medium article.","archived":false,"fork":false,"pushed_at":"2022-05-26T11:18:15.000Z","size":11,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T16:41:11.627Z","etag":null,"topics":["bitly","bitly-alternative","cloudflare","cloudflare-kv","cloudflare-worker","cloudflare-workers","demo","demo-app","kv-storage","medium","medium-article","shorturl","shorturl-services","shorturls"],"latest_commit_sha":null,"homepage":"https://bit.ly/cdz858","language":"JavaScript","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/ClydeDz.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}},"created_at":"2021-10-06T05:57:19.000Z","updated_at":"2023-11-27T13:01:29.000Z","dependencies_parsed_at":"2022-08-28T03:02:59.055Z","dependency_job_id":null,"html_url":"https://github.com/ClydeDz/shorturl-cloudflare-workers","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/ClydeDz%2Fshorturl-cloudflare-workers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClydeDz%2Fshorturl-cloudflare-workers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClydeDz%2Fshorturl-cloudflare-workers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClydeDz%2Fshorturl-cloudflare-workers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClydeDz","download_url":"https://codeload.github.com/ClydeDz/shorturl-cloudflare-workers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230049409,"owners_count":18164882,"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":["bitly","bitly-alternative","cloudflare","cloudflare-kv","cloudflare-worker","cloudflare-workers","demo","demo-app","kv-storage","medium","medium-article","shorturl","shorturl-services","shorturls"],"created_at":"2024-12-17T01:39:45.194Z","updated_at":"2024-12-17T01:39:45.705Z","avatar_url":"https://github.com/ClydeDz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Short URL service using Cloudflare Workers\n\nDemo app created for a Medium article to demonstrate [Cloudflare Workers](https://workers.cloudflare.com/) and [Cloudflare KV storage](https://developers.cloudflare.com/workers/learning/how-kv-works). This app is a short URL service like bit.ly and the likes. We're also automatically deploying this Cloudflare Worker using GitHub Actions.\n\n## Creating a short URL\nOnce you deploy both workers to your Cloudflare account, make a POST request to `https://createshorturl.\u003cworker domain\u003e.workers.dev/` with a `application/json` body like below.\n\n```json\n{\n    \"uniqueKey\": \"git\",\n    \"website\": \"https://github.com\"\n}\n```\n\n## Testing the redirect\nNow, if you head over to `https://shorturl.\u003cworker domain\u003e.workers.dev/git`, it will redirect you to https://github.com because the website that matches the `uniquekey` \"git\" supplied earlier and stored in the KV storage.\n\nSee the About section of this repo for the link to the Medium article.\n\nFollow me on Medium [@ClydeDz](https://clydedz.medium.com/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclydedz%2Fshorturl-cloudflare-workers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclydedz%2Fshorturl-cloudflare-workers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclydedz%2Fshorturl-cloudflare-workers/lists"}