# Black Hole Share A lightweight, ephemeral file sharing service built with Rust and Actix-Web. Upload images or text with a configurable TTL (1-60 minutes) and share via a unique link. Content is automatically purged after expiration. ## Usage ### Run locally ```bash cargo run --release ``` Server starts at `http://0.0.0.0:8080` by default. ### Run with Docker ```bash docker-compose up --build ``` Exposes port `8080` mapped to container port `80`. Volume mounts `./data:/data`. ### Configuration | Environment Variable | Default | Description | | -------------------- | --------- | --------------- | | `BIND_ADDR` | `0.0.0.0` | Address to bind | | `BIND_PORT` | `8080` | Port to bind | ### Web - `GET /` - Upload page - `GET /stats` - Stats dashboard - `GET /bhs/{id}` - View shared content ### API - `POST /api/upload` with JSON `{ duration, content_type, content }` - `GET /api/content/{id}` - `GET /api/stats` ### Logging - Logs are written to `data/logs/log.txt`. - On startup, the previous log file is rotated with a timestamped name.