Very simple link shortener service written in Go (Golang).
- Create
.envfile and
cp .env.example .env- Run container
docker-compose up -dGET /ping
HTTP 200 OK
{
"message": "pong"
}POST /links
| Name | Required | Type | Description |
|---|---|---|---|
| url | Yes | string | URL to shorten. Must be a valid UR.L |
| single_use | No | integer | Whether the short url can be used only once or not. 0: multiple use (default) 1: single use |
HTTP 200 OK
{
"key": "1e1df7dd",
"url": "http://google.com"
}GET /:key
HTTP 301 Moved Permanently
This project is open-sourced software licensed under the MIT license.