https://github.com/tsuk1ko/cf-url-shortener
A URL shorten service deployed on Cloudflare Pages
https://github.com/tsuk1ko/cf-url-shortener
cloudflare-pages url-shortener
Last synced: 9 days ago
JSON representation
A URL shorten service deployed on Cloudflare Pages
- Host: GitHub
- URL: https://github.com/tsuk1ko/cf-url-shortener
- Owner: Tsuk1ko
- Created: 2021-01-10T11:44:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-14T16:27:33.000Z (about 1 year ago)
- Last Synced: 2025-01-10T11:17:22.184Z (9 months ago)
- Topics: cloudflare-pages, url-shortener
- Language: TypeScript
- Homepage: https://yww.uy
- Size: 214 KB
- Stars: 67
- Watchers: 3
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloudflare URL Shortener
A very simple URL shorten service.
No configuration, no management, just use it.
## Deploy
1. Fork this repository.
2. Create a [Cloudflare API Token](https://dash.cloudflare.com/profile/api-tokens) with **Edit Cloudflare Workers** template, and add **D1 edit permission** manually.
3. Set your API Token as repository secret `CLOUDFLARE_API_TOKEN`.
4. Go to **Actions** - **Deploy** - **Run workflow**, run it once.### Setup custom domain
Go to your Cloudflare dashboard, find the `cf-url-shortener` project in **Workers & Pages**, enter the **Custom domains** tab.
### Update from upstream
Go to your forked repository, click **Sync fork** - **Update branch**.
Your Cloudflare Pages project will be update automatically when changes are made to the repository.
### Other secrets
- `ADDITION_HEAD`
The content will be placed in the `` of the page.## Development
Require [bun](https://bun.sh/)
### Project Setup
```sh
bun install
bun dev:init-d1
```### Compile and Hot-Reload for Development
```sh
bun dev
```