aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 17 insertions, 2 deletions
diff --git a/README.md b/README.md
index ef4764d..d5c9139 100644
--- a/README.md
+++ b/README.md
@@ -8,9 +8,24 @@ in e.g. passenger information systems. Timetables are read in via GTFS.
## Server
I run a test-deployment of this at (tracktrain.stuebinm.eu)[https://tracktrain.stuebinm.eu].
+### API
It self-generates an OpenAPI description of the currently implemented routes at
-(`/api`)[https://tracktrain.stuebinm.eu/debug/openapi].
-
+(`/api/openapi`)[https://tracktrain.stuebinm.eu/debug/openapi].
+
+### Metrics
+It offers prometheus-compatible metrics under /metrics. Run the server with `+RTS -T`
+to also get metrics on the ghc runtime system (via the [prometheus-metrics-ghc](https://hackage.haskell.org/package/prometheus-metrics-ghc-1.0.1.2/docs/Prometheus-Metric-GHC.html
+))
+package.
+
+## Routes
+The entire app is written as a single monolithic webserver, so you might want
+to restrict access via a reverse-proxy:
+ - /api must be public (otherwise tracking won't work)
+ - /api/openapi is a self-description of the API endpoints
+ - /obu is the onboard-unit for tracking
+ - /metrics is a prometheus-compatible metrics endpoint
+ - everything else (including /) is part of the admin interface
## Packages & Modules