A basic, open source URL shortener built using Solid.js and Cloudflare Workers
Besides the opportunity to fiddle with new technologies, URLs are important. A shortlink sent by a legitimate company using a commercial service could be hijacked by the URL shortener to phish credentials. Enterprise companies often maintain their own URL shortening services as a measure of security.
The economics of Cloudflare Workers and K/V allow you to run your own for free, even at volume. Or you could use shrtr.cloud
- Install & configure Wrangler.
- Replace the values in the workers'
wrangler.toml
files with your Cloudflare zone ID, account ID, path, and K/V ID. - Deploy workers.
- Deploy frontend to Cloudflare Pages or similar free static hosting.
The workers are also accessible via a public API documented here and via an OpenAPI spec.