Website - Hosted version coming soon
Before deploying you'll need to put your info into the zone_id, account_id, route, and [[kv-namespaces]] sections of wrangler.toml To deploy with Wrangler, you'll need at least version 1.2.0.
This requires 2 Workers KV Namespaces, mapped to SHORTLINKS and HITS.
The shortlink is currently used as the key for both.
HITS currently doesn't display data anywhere but collects hit counts for future usage.
| Namespace | Key | Value |
|---|---|---|
| SHORTLINKS | shortlink | url |
| HITS | shortlink | hit count |
This version adds support for handling KV Namespaces via Wrangler.
- Run
git clone https://github.com/eldridgea/lil-link - Create 2 KV Namespaces in the Cloudflare Dashboard or via their API.
- Fill out the
zone_id,account_idfields inwrangler.toml. - Fill out the
routesection inwrangler.tomlwithhttps://example.com/*, replacing "example.com" with your domain. - Paste one of your newly created KV Namespace IDs into
wrangler.tomlunderSHORTLINKSand the other underHITS cdinto the lil-link directory and runwrangler publish --release
Note: I have been unable to get Workers run unless there is already an active DNS record in the Cloudflare dashboard. I have an A record for @ on lillink.co pointing to a server I control, but as my route is set to https://lillink.co/* supposedly the server will never be contacted as Workers will intercept all requests.