2021-08-14 13:52:56 +00:00
|
|
|
<p align="center">
|
|
|
|
<img height="150" src="https://git.odit.services/user/avatar/kauft.es/140">
|
|
|
|
<h1 align="center">LinkyLinky 🔗</h1>
|
|
|
|
<h3 align="center">A small url shortener, originaly developed for kauft.es</h3>
|
|
|
|
</p>
|
2021-08-14 07:40:07 +00:00
|
|
|
|
2022-01-12 17:04:14 +00:00
|
|
|
## Features
|
|
|
|
* Url shortinging to 18-byte hex ids
|
|
|
|
* Special shortening "providers" for well-used services
|
|
|
|
|
|
|
|
### Provider patterns
|
2022-01-12 17:12:33 +00:00
|
|
|
> The base pattern is always baseurl/providerOrShortCode
|
2022-01-12 17:04:14 +00:00
|
|
|
|
|
|
|
| Provider | Pattern | Resolves to | Notes |
|
|
|
|
| - | - | - | - |
|
2022-01-12 17:12:33 +00:00
|
|
|
| Native (Shortcode) | `/id` | Whatever the database entry points to | None |
|
2022-01-12 17:04:14 +00:00
|
|
|
| YouTube (Video) | `/yt/id` | `https://youtu.be/id` | None |
|
|
|
|
| YouTube (Playlist) | `/ytpl/id` | `https://youtube.com/playlist?list=id` | Remember: Private playlists will result in user-side errors |
|
|
|
|
| Amazon | `/a/id` | `https://amazon.de/dp/id` | Recognizes all kind of cursed amazon urls (+smile and others) |
|
2022-01-12 17:12:33 +00:00
|
|
|
| eBay | `/e/id` | `https://ebay.de/itm/id` | Only tested with German eBay |
|
|
|
|
| Reddit | `/r/id` | `https://redd.it/id` | Powered by the awesome work of u/TheAppleFreak https://kauft.es/r/4vapin |
|
2022-01-12 17:04:14 +00:00
|
|
|
|
2021-08-14 07:40:07 +00:00
|
|
|
## Dev Setup 🛠
|
|
|
|
> Runs on port 3000
|
|
|
|
|
|
|
|
#### Yarn
|
|
|
|
```bash
|
|
|
|
yarn
|
|
|
|
yarn migrate
|
|
|
|
yarn dev
|
|
|
|
```
|
|
|
|
|
|
|
|
#### NPM
|
|
|
|
```bash
|
|
|
|
npm i
|
|
|
|
npm run migrate
|
|
|
|
npm run dev
|
|
|
|
```
|
|
|
|
|
|
|
|
## Docker 🐳
|
|
|
|
> Runs on port 3000
|
|
|
|
```
|
|
|
|
docker-compose build
|
|
|
|
docker-compose up
|
|
|
|
```
|