Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

CorentinTh/snut

Repository files navigation

Warning

Archived and no longer maintained. Please check Enclosed for an up-to-date alternative.

Snut

Another pastebin with a clean and minimalist ui. Made for selfhosting.

Use it online : snut.thomasset.co

screenshot

Host your instance

Installation

docker run -d --restart unless-stopped -v $(pwd)/db:/app/db -e DATABASE_PATH=/app/db/db.sqlite -p 3000:3000 --name snut corentinth/snut:nightly

Configuration

ENV variable Default value Format Description
NODE_ENV development production, development, test The application environment.
PORT 3000 port The port to bind.
MS_BEFORE_OUTDATED 3600000 Number The duration in ms before an entry is outdated.
CHECK_OUTDATED_MS 10000 Number The interval in ms to check for outdated.
DB_TYPE sqlite sqlite, mysql, postgres, cockroachdb, mariadb The database type
DB_PATH ./db.sqlite String Sqlite database path.
THROTTLE_TTL 1800000 Number Timeframe for which requests are checked/remembered.
THROTTLE_LIMIT 100 Number Max number of connections during windowMs milliseconds before sending a 429 response.

Contribute

Pull requests are welcome ! Feel free to contribute.

To contribute to this project, first clone this repo

git clone git@github.com:CorentinTh/snut.git

Installation

pnpm i

Running the app

# development
pnpm dev

Test

# unit tests
pnpm  test

Credits

Coded with ❤️ by Corentin Thomasset.

Name found with ❤️ by Aimie Tremoureux.

License

This project is under the MIT license.