Skip to content

Half-Shot/nnus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nnus

No Nonsense URL Shortnener written in Rust.

cargo install --git https://github.com/Half-Shot/nnus.git#1.0.0
nnus

Features

  • You can be redirected to a new URL by following a short URL (GET)

  • You can check where a URL will redirect you before going to it (HEAD)

  • Configuration in SQLite3

  • Lightweight process (<50KB)

Installation

You can install the binaries found inside Releases.

OR

You can install using cargo

(You will need Rust. You can install it using RustUp)

cargo install --git https://github.com:Half-Shot/nnus.git#1.0.0

Configuration

You must add links to the links table in the generated SQLite3 database.

sqlite3 ~/.nnus/db.db3 "INSERT INTO links VALUES ('nnus', 'https://github.com/Half-Shot/nnus')"

A restart of the nnus process is not required.

You can also query links using

sqlite3 ~/.nnus/db.db3 "SELECT * FROM links"

You can set the bind address with the NNUS_BIND environment variable, by default this is 127.0.0.1:6767. It is expected that you host this service behind a reverse proxy like NGINX.

You can set the database storage location with the NNUS_DB environment variable. By default this is ~/db.db3.

Contact

You can contact me on Matrix via @Half-Shot:half-shot.uk.