https://github.com/timelessnesses/redirector
Cloudflare-powered URL shortener
https://github.com/timelessnesses/redirector
Last synced: 11 months ago
JSON representation
Cloudflare-powered URL shortener
- Host: GitHub
- URL: https://github.com/timelessnesses/redirector
- Owner: timelessnesses
- Created: 2025-04-24T16:15:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-25T02:25:47.000Z (about 1 year ago)
- Last Synced: 2025-04-25T03:32:01.369Z (about 1 year ago)
- Language: TypeScript
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# redirector
Cloudflare-powered URL shortener.
## Deploy
```bash
pnpm install
pnpx wrangler publish
pnpx wrangler d1 execute redirector --file .\src\create.sql --remote
```
## Add
```bash
curl -X GET https://{your-domain}/add?url=https://example.com&expires=30
```
expires is optional arg where you provided "age" in seconds (default 3 days)
## Get
```bash
curl -X GET https://{your-domain}/get?id={id}
```
Returns useful information about the URL. (Expiration time, original URL)
## Go
```bash
curl -X GET https://{your-domain}/{id}
```
Redirects to the original URL.