From adb2aa4ed27fff1abbc5cbe95843d29701390b26 Mon Sep 17 00:00:00 2001 From: n0rrman Date: Sun, 26 May 2024 12:45:15 +0700 Subject: [PATCH] README edited --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 28be0d5..27de0dc 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Subhub is a small WebSub hub demo implemented in Go using echo, http/net, and Po ### Endpoints `POST /`: Reads header for required parameters and handle subscription requests. + `GET /publish`: Acts as the publisher for testing, broadcasts content to subscribers. ### Files @@ -62,11 +63,31 @@ The diagram shows a successful `/publish` call. The `dummyPublisher()` fetches a #### Run demo -The local demo uses `modfin/websub-client:latest` as a subscriber and runs entirely in Docker containers. To run the demo: +The local demo uses `modfin/websub-client:latest` as a Subscriber and runs entirely in Docker containers. To run the demo: + ``` docker compose up --build ``` +The Subscriber will automatically subscribe to the Hub. To resubscribe send a GET request to (or open in a browser): + +``` +http://localhost:8080/resub +``` + +To distribute content from the Hub to the Subscribers. + +``` +http://localhost/publish +``` + +To view the successfully recieved content on the Subscriber: + +``` +http://localhost:8080/log +``` + + #### Live version A live version of the hub (without the subscriber container) is running on https://subhub.henriknorrman.com.