A pastebin written in Rust.
- https://yarnpkg.com/: Asset management
Set a DATABASE_URL
environment variable (eg DATABASE_URL=sqlite:https://sqlite.db
). Then, init the database:
touch sqlite.db
Build static assets:
yarn
yarn run build
Launch the http server:
toothpaste --ip 127.0.0.1 --port 8080 # default values
Finally, setup a cron every minute for paste expire cleanup:
* * * * * wget -q -O /dev/null "http(s):https://your_host/paste/cleanup"
For easier development, use https://github.com/watchexec/cargo-watch to auto-compile on change:
cargo watch -x 'run'
Auto-compile static assets:
yarn run start