A minimal pastebin.
minibin is a slightly-tweaked fork of bin by Jordan Doyle with syntax highlighting removed to make it even more minimal.
- In-memory, no database.
- Create and view pastes from the browser or the command line.
- Make sure you have
docker
anddocker-compose
- Clone this repository somewhere and
cd
to it - Optionally, adapt
docker-compose.yml
to your liking
Then run:
$ docker-compose build
$ docker-compose up -d
Should now be accessible on http://0.0.0.0:8000
.
Install rustup, then:
$ git clone https://github.com/tylerlm/minibin.git
$ cd minibin
$ cargo +nightly build --release
Compiling minibin v0.0.1 (/home/user/code/minibin)
Finished release [optimized] target(s) in 5.55s
Find the resulting binary at ./target/release/minibin
-- just run it.
minibin uses rocket so you can add a rocket config file if you like.
ROCKET_PORT
: change the default port (default: 8000)PASTEBIN_MAX_PASTES
: how many pastes to keep (default: 1000)
$ curl -X PUT --data 'example text' https://bin.example.com
https://bin.example.com/abcdefghij
$ echo 'example file' > file.txt
$ curl -X PUT --data-binary @file.txt https://bin.example.com
https://bin.example.com/klmnopqrst
$ echo 'example stdin' | curl -X PUT --data-binary @- https://bin.example.com
https://bin.example.com/uvwxyzabcd
$ curl https://bin.example.com/abcdefghij
example text
$ curl https://bin.example.com/klmnopqrst
example file
$ curl https://bin.example.com/uvwxyzabcd
example stdin