https://github.com/eartharoid/go
A serverless alternative to YOURLS.
https://github.com/eartharoid/go
cloudflare-workers serverless yourls
Last synced: 5 months ago
JSON representation
A serverless alternative to YOURLS.
- Host: GitHub
- URL: https://github.com/eartharoid/go
- Owner: eartharoid
- License: mit
- Created: 2021-01-22T11:56:14.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-10-02T22:34:33.000Z (over 3 years ago)
- Last Synced: 2025-03-11T08:27:30.684Z (10 months ago)
- Topics: cloudflare-workers, serverless, yourls
- Language: HTML
- Homepage: https://eartharoid.me/blog/eartharoid-go
- Size: 329 KB
- Stars: 19
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eartharoid:go
Originally made in January 2021, as a serverless replacement for YOURLS, with Vercel & Firebase/Firestore.
The UI never really worked properly due to Vercel's caching, and became quite slow with all the unnecessary click data in the database.

To view the code and read more about the original version, switch to the [v1 branch](https://github.com/eartharoid/go/tree/v1).
## How it works
It uses Cloudflare Workers, and URLs are stored in KV. This is my first Cloudflare Workers & KV project. There's no UI or even an API for managing URLs currently (because I rarely need to shorten a URL quickly), so links must be added either via the Cloudflare Dashboard, or the wrangler CLI.
It uses [umami](https://umami.is) for privacy-friendly analytics/stats.
### Routes
- `/:id.png` -> Generate a QR code
- `/:id+` -> Redirect to umami
- `/:id~` -> Show the link preview page
- `/:id` -> Redirect to long URL
- `/*` -> Redirect to `eartharoid.me`