mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
Edge Service
Cache-first SVG proxy in front of the generator. Deploy many instances around the world. No DB of its own; optional Redis for shared cache.
Run locally
cd edge
pip install -r requirements.txt
GENERATOR_URL=http://localhost:5002 python -m src.api
Test
cd edge && pytest
Docker
docker build -t ghstats-edge .
docker run --rm -e GENERATOR_URL=http://host.docker.internal:5002 -p 5003:5003 ghstats-edge
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /health | cache type + upstream reachability |
| GET | / | composite SVG (cached on X-Widget-Status: ready) |
| GET | //.svg | individual widget SVG |
Env
GENERATOR_URL— origin (required)CACHE_TYPE—SimpleCache(default) orRedisCacheCACHE_REDIS_URL— if using RedisCacheCACHE_DEFAULT_TIMEOUT— seconds, default 86400CACHE_THRESHOLD— max entries (SimpleCache only), default 10000