Skip to content

Container image

Andy Gayton edited this page Nov 11, 2024 · 7 revisions

You can use docker to server an instance of xs like this:

docker run -e XS_START="xs serve ./store --expose 0.0.0.0:8080" -p 8080:8080 ghcr.io/cablehead/xs:latest

xs should now be available on localhost:8080

curl localhost:8080  # will pull the event stream

# the `xs` cli doubles as a HTTP client
xs cat :8080

# append to the stream
echo "foo" | xs append :8080 a-topic  # or echo "foo" | curl -d @- localhost:8080/a-topic

Clone this wiki locally