https://github.com/frectonz/taqsir
A simple url shortner
https://github.com/frectonz/taqsir
Last synced: 16 days ago
JSON representation
A simple url shortner
- Host: GitHub
- URL: https://github.com/frectonz/taqsir
- Owner: frectonz
- License: mit
- Created: 2022-11-03T11:48:38.000Z (over 3 years ago)
- Default Branch: trunk
- Last Pushed: 2022-11-10T17:08:02.000Z (over 3 years ago)
- Last Synced: 2025-03-03T17:13:45.990Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://taqsir.netlify.app/
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Taqsir
Taqsir is "shorten" translated to Arabic. According to Google Translate. It's a simple URL shortener API.
## Usage
POST to `https://taqsir.deno.dev/shorten` with a JSON body of:
```json
{
"url": "https://example.com"
}
```
the response will be a a shortened URL with a suffix from the [adjectives.ts](./adjectives.ts) file and the response code will be `201 Created`.
```json
{
"status":"ok",
"url":"https://taqsir.deno.dev/"
}
```
if you want to use a custom suffix, you can do so by adding a `suffix` key to the JSON body:
```json
{
"url": "https://example.com",
"suffix": "dance"
}
```
If the suffix you requested is already taken, you will get a `409 Conflict` response with the following body:
```json
{
"status":"error",
"message":"suffix already taken"
}
```
## Technologies used
- [Deno](https://deno.land/)
- [Oak](https://github.com/oakserver/oak)
- [Supabase](https://supabase.io/)
- [Deno Deploy](https://deno.com/deploy)
- [adjectives.ts](./adjectives.ts) is a list of adjectives from [this repo](https://github.com/dariusk/corpora/blob/master/data/words/adjs.json)