docs: update readme

This commit is contained in:
2026-03-01 13:05:04 +01:00
parent 53dd416c17
commit cf492f9798

View File

@@ -13,11 +13,13 @@ A secure, self-hostable "burn after reading" paste service with ephemeral storag
## Architecture ## Architecture
- Gleam: Type-safe language built upon the BEAM | Component | Description |
- Web: Wisp framework + Mist HTTP server | ------------ | -------------------------------------------------------------------------------- |
- Frontend: Lustre for HTML rendering | Backend/Core | Gleam (type-safe language built upon the BEAM) |
- Storage: In-memory only (no persistence) | Web | Wisp framework + Mist HTTP server |
- Security: AES-256-GCM client-side encryption, CSRF tokens, rate limiting, security headers | Frontend | Lustre for HTML rendering |
| Storage | In-memory only (no persistence) |
| Security | AES-256-GCM client-side encryption, CSRF tokens, rate limiting, security headers |
## Configuration ## Configuration
@@ -47,7 +49,9 @@ For development, you can use:
SECRET_KEY_BASE=dev gleam run SECRET_KEY_BASE=dev gleam run
``` ```
## Quick Start ## How to run
### Development
```bash ```bash
# Clone and build # Clone and build
@@ -58,22 +62,26 @@ gleam run
The server starts on `http://localhost:3000`. The server starts on `http://localhost:3000`.
## Docker image+deployment Note: you can run tests with `gleam test`.
### Build ### Production
Production environment is meant to be run via Docker.
You can build the Docker image with:
```bash ```bash
docker build -t spasteg . docker build -t spasteg .
``` ```
### Run Then run the container with:
```bash ```bash
# Generate a secure key # Generate a secure key
docker run -p 3000:3000 -e SECRET_KEY_BASE=$(openssl rand -base64 48) spasteg docker run -p 3000:3000 -e SECRET_KEY_BASE=$(openssl rand -base64 48) spasteg
``` ```
**With custom port:** Or use a custom port:
```bash ```bash
docker run -p 8080:3000 -e SECRET_KEY_BASE=$(openssl rand -base64 48) -e PORT=3000 spasteg docker run -p 8080:3000 -e SECRET_KEY_BASE=$(openssl rand -base64 48) -e PORT=3000 spasteg