Operations
Routes & API reference
Every route the server exposes, and exactly how the two Polymarket upstreams are proxied.
Routes
| Method & path | Behaviour |
|---|---|
GET / | The dashboard, with the account bar injected. Public. |
GET /login | The login form. Redirects to / if already signed in. |
POST /login | Validates credentials (constant-time compare); on success sets the signed session cookie and redirects to /; on failure re-renders with an error (HTTP 401). |
GET /logout | Clears the cookie and returns to /. |
GET /docs/ | This documentation site (static files under public/docs/). |
GET /forecasts.json | Bundled forecast data. Other static files under public/ are served the same way; missing optional files return 404. |
GET /api/gamma/* | Proxied to the Polymarket Gamma API. |
GET /api/clob/* | Proxied to the Polymarket CLOB. |
Proxy mapping
| Dashboard call | Upstream |
|---|---|
/api/gamma/events?closed=false&limit=500&tag_slug=weather&order=liquidity&ascending=false |
https://gamma-api.polymarket.com/events?… |
/api/clob/book?token_id=<id> |
https://clob.polymarket.com/book?token_id=<id> |
The proxy forwards the path and query string unchanged, sends a JSON Accept
header, and returns the upstream status, content-type and body verbatim. Only
GET is handled — the dashboard makes no other request types. On an upstream
failure the proxy responds 502 with a short JSON error.
Static fallback rules
- Unknown paths ending in
.json, under/api/, or with a file extension return a clean404— this is what lets the dashboard's own fallback logic work (e.g. trying a per-continent file, then the global one). - Other unknown navigation paths redirect to
/.
Quick checks
# dashboard responds
curl -I http://<server-ip>/
# forecast data present
curl -s http://<server-ip>/forecasts.json | head -c 200
# live market proxy reachable (expect JSON, not an error)
curl -s "http://<server-ip>/api/gamma/events?limit=1&tag_slug=weather" | head -c 200
Forecasting dashboard documentation · Meteo Bulgaria EOOD · 2026