Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/half-shot/nnus
No Nonsense URL Shortener
https://github.com/half-shot/nnus
cargo lightweight rust simple small url-shortener
Last synced: about 1 month ago
JSON representation
No Nonsense URL Shortener
- Host: GitHub
- URL: https://github.com/half-shot/nnus
- Owner: Half-Shot
- License: gpl-3.0
- Created: 2019-12-11T11:38:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-15T12:32:00.000Z (about 5 years ago)
- Last Synced: 2024-12-09T20:08:52.972Z (about 2 months ago)
- Topics: cargo, lightweight, rust, simple, small, url-shortener
- Language: Rust
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nnus
No Nonsense URL Shortnener written in Rust.
```sh
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](https://github.com/Half-Shot/nnus/releases).
**OR**
You can install using `cargo`
(You will need [Rust](https://www.rust-lang.org/). You can install it using [RustUp](https://rustup.rs/))
``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.
```sh
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
```sh
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](https://www.nginx.com/).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`](https://matrix.to/#/@Half-Shot:half-shot.uk).