https://github.com/jerryshell/tp
📜 tp is a serverless URL shortener based on Cloudflare Workers.
https://github.com/jerryshell/tp
cloudflare-workers serverless url-shortener workers-rs
Last synced: 2 months ago
JSON representation
📜 tp is a serverless URL shortener based on Cloudflare Workers.
- Host: GitHub
- URL: https://github.com/jerryshell/tp
- Owner: jerryshell
- License: agpl-3.0
- Created: 2023-02-03T12:59:53.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-30T15:47:08.000Z (almost 3 years ago)
- Last Synced: 2025-01-16T15:27:07.905Z (about 1 year ago)
- Topics: cloudflare-workers, serverless, url-shortener, workers-rs
- Language: Rust
- Homepage: https://tp.jerryshell.workers.dev
- Size: 74.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

*tp* is a serverless URL shortener based on [Cloudflare Workers](https://developers.cloudflare.com/workers).
> "tp" stands for "Town Portal Scroll" in DotA.
Bilibili Video: [https://www.bilibili.com/video/BV1jc411T7Cf](https://www.bilibili.com/video/BV1jc411T7Cf)
## Example
```bash
# 1. Create link
curl -X POST -d '{ "url": "https://google.com" }' https://tp.jerryshell.workers.dev/create
# 2. Get response /goto/cXB3HpG
# 3. Open in browser https://tp.jerryshell.workers.dev/goto/cXB3HpG
```
## Wrangler cmd
### Login
```bash
npx wrangler login
```
### Create KV namespace
```bash
wrangler kv:namespace create tp
wrangler kv:namespace create tp --preview
```
### Dev
```bash
npx wrangler dev
```
### Publish
```bash
npx wrangler publish
```
## LICENSE
[GNU Affero General Public License v3.0](https://choosealicense.com/licenses/agpl-3.0)