https://github.com/gldraphael/redirector
🔀 A config-only barebones URL shortener.
https://github.com/gldraphael/redirector
config url-shortener
Last synced: about 1 year ago
JSON representation
🔀 A config-only barebones URL shortener.
- Host: GitHub
- URL: https://github.com/gldraphael/redirector
- Owner: gldraphael
- License: mit
- Created: 2023-05-01T06:36:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T18:09:12.000Z (almost 2 years ago)
- Last Synced: 2025-05-30T14:45:17.009Z (about 1 year ago)
- Topics: config, url-shortener
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redirector
`redirector` is a config-only bare bones URL shortener.
It supports the following features:
* Use configuration to set URL slugs to redirect to a target URL.
* 30MB uncompressed docker image (13MB compressed).
* No database, no analytics, no external dependencies.
Redirection rules can be configured using a simple `rules.yaml` file:
```yaml
rules:
- slug: author
target: https://github.com/gldraphael
- slug: repo
target: https://github.com/gldraphael/redirector
```
## Quickstart with docker
```sh
docker run --rm -p 8080:8080 ghcr.io/gldraphael/redirector:main
# localhost:8080/repo will now redirect to this repo
```
## Quickstart with go
```sh
go run .
```
## Configuration
Environment variable | Default value | Description
----------------------------|------------------|----------------------
`REDIRECTOR_RULES` | `./rules.yaml` | The file to read the redirection rules from.
`REDIRECTOR_SERVER_ADDRESS` | `localhost:8080` | The server address.