From e40ff9e9a0e1011f68a99b3c6c605dc7c606afbe Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Sat, 26 Oct 2024 12:15:20 +0100 Subject: [PATCH 1/2] docs: instructions for updating the Sugar client Add a README with instructions for updating the Sugar client whenever the Sugar server is updated. --- lib/SugarClient/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/SugarClient/README.md diff --git a/lib/SugarClient/README.md b/lib/SugarClient/README.md new file mode 100644 index 0000000..8ebf2c4 --- /dev/null +++ b/lib/SugarClient/README.md @@ -0,0 +1,13 @@ +# Sugar Client + +A javascript client for [Sugar](https://github.com/zooniverse/sugar), a notification service using web sockets. + +## Primus library + +This needs to be kept in sync with the Sugar Server's primus package installation whenever the server version updates due to the way the transport client library is embedded into the version of the primus package, https://github.com/primus/primus#client-library + +In order to sync this client version with the server we can derive the latest [primus.js](./primus.js) file by [running the sugar server locally](https://github.com/zooniverse/sugar#development-via-docker--docker-compose) and downloading the primus.js file from sugar dev server via the web browser or via `curl -s http:localhost:2999/primus.js > primus.js`. + +YOu can also download `primus.js` from https://notifications.zooniverse.org/primus.js. + +You can then replace the local version of `primus.js` with the server dervied one from sugar server and PR to replace it here. From 755de09041563e4a0b868a6fa820b11b2289e569 Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Sat, 26 Oct 2024 12:18:16 +0100 Subject: [PATCH 2/2] Fix a typo --- lib/SugarClient/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SugarClient/README.md b/lib/SugarClient/README.md index 8ebf2c4..1e02fa3 100644 --- a/lib/SugarClient/README.md +++ b/lib/SugarClient/README.md @@ -8,6 +8,6 @@ This needs to be kept in sync with the Sugar Server's primus package installatio In order to sync this client version with the server we can derive the latest [primus.js](./primus.js) file by [running the sugar server locally](https://github.com/zooniverse/sugar#development-via-docker--docker-compose) and downloading the primus.js file from sugar dev server via the web browser or via `curl -s http:localhost:2999/primus.js > primus.js`. -YOu can also download `primus.js` from https://notifications.zooniverse.org/primus.js. +You can also download `primus.js` from https://notifications.zooniverse.org/primus.js. You can then replace the local version of `primus.js` with the server dervied one from sugar server and PR to replace it here.