Extremely minimalistic, static-route HTTP server with simple config via file, env, or CLI.
# Run from GitHub Container Registry
docker run --rm -p 8080:8080 ghcr.io/lynxzp/diggy:latest
# Or build & run locally with the provided Dockerfile
docker build -t diggy .
docker run --rm -p 8080:8080 diggy./app -port=8080 -host=0.0.0.0 -interval_ms=2000 -poll_timeout_ms=50 -mine=1or
DIGGY_HOST=0.0.0.0 DIGGY_PORT=8080 DIGGY_INTERVAL_MS=2000 DIGGY_POLL_TIMEOUT_MS=50 DIGGY_MINE=1 ./appor
# Create a config file `diggy.conf` in the same directory as the binary
./appor mix configs.
Settings are loaded in this order (later overrides earlier):
diggy.conf(same directory as the binary)- Environment variables
DIGGY_* - CLI flags
-key=value
Precedence: CLI > Env > Config file
| Parameter | Keys (file / env / CLI) | Default | Effect |
|---|---|---|---|
port |
port / DIGGY_PORT / -port= |
8080 |
TCP port to bind |
host |
host / DIGGY_HOST / -host= |
0.0.0.0 |
IPv4 address to bind |
interval_ms |
interval_ms / DIGGY_INTERVAL_MS / -interval_ms= |
2000 |
How often one line of built-in content is printed to stdout when mine=1. Cadence is tied to poll_timeout_ms |
poll_timeout_ms |
poll_timeout_ms / DIGGY_POLL_TIMEOUT_MS / -poll_timeout_ms= |
100 |
Poll timeout per loop. Lower = more responsive & tighter timers (more CPU); higher = less CPU, coarser timers |
mine |
mine / DIGGY_MINE / -mine= |
1 |
1 enables periodic stdout "mining"; 0 disables. No effect on HTTP responses |
port=8080
host=0.0.0.0
interval_ms=2000
poll_timeout_ms=100
mine=1
All responses are text/plain; charset=utf-8.
GET /– static content, song of the minersGET /health– OKGET /about– short server descriptionGET /info– version/info- Any other path → 404 Not Found
- Binds to
host:portand serves the fixed routes above - Main loop polls the listening socket; every
interval_ms(approx., based onpoll_timeout_ms) prints the next line of the built-in content to stdout ifmine=1