Clew: a URL shortener with SQLite click counts
Clew is a small URL shortener with a JSON API. Send a destination to /api/links and it returns a short URL. Following that URL sends a 302 redirect and records the visit. For concurrent visits, each redirect starts a BEGIN IMMEDIATE transaction before updating the total and storing the click time. Clew keeps the total count and the newest 20 timestamps. A HEAD request checks the destination…
We haven't written up this one. Dev.to has the full story — the link below goes straight to it.