simpleshortener

Crates.iosimpleshortener
lib.rssimpleshortener
version0.2.1
sourcesrc
created_at2022-02-16 05:56:16.007189
updated_at2022-04-03 18:51:16.623818
descriptionA quite simple link shortener
homepage
repositoryhttps://github.com/randomairborne/SimpleShortener.git
max_upload_size
id533102
size171,503
valkyrie_pilot (randomairborne)

documentation

README

Simple URL shortener

A very simple URL shortener, which is easy to configure and quite speedy. Later it is planned to add some analytics.

If you have any issues you can contact me on discord, valkyrie_pilot#2707, or via email valk@vky.one

You can edit links at /simpleshortener/ on the domain you use to host it.

Install

Create this config file:

# Port to run SimpleShortener on. Can be overridden with the `PORT` environment variable.
port = 24529
# Where to keep files
database = "/etc/simpleshortener/links.bincode"
# A key:value list of username:sha256-hashed passwords
users = { admin = "fc8252c8dc55839967c58b9ad755a59b61b67c13227ddae4bd3f78a38bf394f7" }

# Uncomment to enable TLS
# This also requires the TLS-enabled binary:
# if the default binary is downloaded, TLS is entirely ignored
# [tls]
# port = 443
# certfile = "/path/to/cert.pem"
# keyfile = "/path/to/key.pem"

then run with ./target/bin/simpleshortener /path/to/config.toml

Building

You can build from source with rust

Without TLS support

git clone https://github.com/randomairborne/SimpleShortener.git
cargo build --release

With TLS support

git clone https://github.com/randomairborne/SimpleShortener.git
cargo build --release --features tls
Commit count: 350

cargo fmt