- Go to the KV section in cloudflare dashboard create a new KV with some name
- Go to the Workers pane in Cloudflare and click create a service
- Give it a name, so this will be the url for your service worker and click create service
- Click on Quick Edit and Copy the code from index.js to the worker
- Next Go to the KV Namespace Binding in settings of the worker
- Give the variable name as REDIRECT_KV and link it to the name of KV you created and hit save.
- Now whatever you add in the KV namespace can be used as a redirect link.
- Your service will be available at url.workerdomain.workers.dev/kv-value
You are free to add as much links you want. You have successfully created a mini Bit.ly Service