Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/francis-du/url-shortener
URL-Shortener is a simple app that is build on Cloudflare Workers using Short.io API.
https://github.com/francis-du/url-shortener
cloudflare-workers serverless-functions typescript url-shortener wrangler-app
Last synced: 3 months ago
JSON representation
URL-Shortener is a simple app that is build on Cloudflare Workers using Short.io API.
- Host: GitHub
- URL: https://github.com/francis-du/url-shortener
- Owner: francis-du
- License: mit
- Created: 2020-11-19T04:20:53.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-07T22:18:06.000Z (almost 2 years ago)
- Last Synced: 2023-03-07T21:14:17.624Z (almost 2 years ago)
- Topics: cloudflare-workers, serverless-functions, typescript, url-shortener, wrangler-app
- Language: TypeScript
- Homepage: https://short.francis.run
- Size: 8.87 MB
- Stars: 2
- Watchers: 1
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
URL-Shortener
[![Deploy](https://github.com/francis-du/url-shortener/workflows/Deploy/badge.svg)](https://github.com/francis-du/url-shortener/actions?query=workflow%3ADeploy)
[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square&color=%23E5531A)](https://github.com/francis-du/url-shortener/blob/main/LICENSE)[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/francis-du/url-shortener)
---
## What's this
URL-Shortener is a simple app that is build on [Cloudflare Workers](https://workers.cloudflare.com) using Short.io API.
[![index](src/static/img/index.png)](https://short.francis.run/?link=https%3A%2F%2Ffrancis.run)
## How to use
### Web UI
- Open Website [`https://short.francis.run`](https://short.francis.run)
- Paste the long link you want to shorten.
- Click the Short button to generate a short link.
### Request
- Request Url [`https://short.francis.run`](https://short.francis.run)
- Request parameters and return response data
| parameters | description | required |
| ---- | ---- | ------- |
| ?link="" | link, which you want to shorten| Y|
| ?api="true" | Return json data - Required| Y |
| ?title="" |title of created URL to be shown in short.cm admin panel | N |
| ?path"" | optional path part of newly created link. If empty - it will be generated automatically | N |## Debug and Publish
1. Install [Cloudflare Wrangler](https://github.com/cloudflare/wrangler)
```shell
npm i @cloudflare/wrangler -g
```2. Build
```shell
wrangle build
```3. Preview
```shell
wrangle preview
```4. Debug
```shell
wrangle dev
```5. Publish
```shell
wrangle publish
```## LICENSE
[MIT LICENSE](LICENSE)