bref

Crates.iobref
lib.rsbref
version0.1.0
sourcesrc
created_at2023-10-07 16:10:40.744158
updated_at2023-10-07 16:10:40.744158
descriptionA modest URL shortener for personal usage.
homepage
repository
max_upload_size
id996448
size72,751
Nicolas Gryman (ngryman)

documentation

README

bref

A modest URL shortener for personal usage.

Shortens URLs to a 6 characters-length key that is generated based on current time. Why? Why not?

Usage

Shorten a URL

$ http post :8080 url="https://ngryman.sh"
HTTP/1.1 200 OK
content-length: 40
content-type: application/json
date: Sat, 07 Oct 2023 13:16:43 GMT

{
    "key": "1qp7Ah",
    "url": "https://ngryman.sh"
}

Redirect

$ http get :8080/1qp6Oj
HTTP/1.1 307 Temporary Redirect
content-length: 0
date: Sat, 07 Oct 2023 13:17:43 GMT
location: https://ngryman.sh

Deployment

Bref can easily be deployed to fly.io. Please refer to the deploy workflow pipeline.

Commit count: 0

cargo fmt