blockstream-satellite-api/sse
Blockstream Satellite f2058ac3f8 Add admin route for SSE on get-protected channels
The auth channel does not allow users to get messages (access them over
the internet). Hence, a regular SSE client should not be able to monitor
the events generated on the auth channel. In contrast, an admin host
should be able to monitor the auth events. For that, this patch adds an
/admin/subscribe endpoint that is SSL-authenticated in production, so
only the admin hosts can connect to it.
2023-02-02 17:16:12 -03:00
..
Dockerfile Bump SSE server dependencies 2021-07-22 10:18:15 -03:00
LICENSE initial commit 2019-01-16 10:22:44 -08:00
package-lock.json Bump SSE server dependencies 2021-07-22 10:18:15 -03:00
package.json Bump SSE server dependencies 2021-07-22 10:18:15 -03:00
README.md initial commit 2019-01-16 10:22:44 -08:00
server.js Add admin route for SSE on get-protected channels 2023-02-02 17:16:12 -03:00
test-producer.js initial commit 2019-01-16 10:22:44 -08:00

Redis to SSE

Subscribes to a redis pub/sub channel and broadcasts messages over HTTP server-sent events.

To start the server:

$ git clone git@github.com:shesek/redis-to-sse && cd redis-to-sse
$ npm install
$ REDIS_URI=redis://127.0.0.1:6379 SUB_TOPIC=foobar PORT=4500 npm start

To subscribe to events, send a GET request to /stream.