An example used for a fastify-redis-channels plugin.
Create a directory and clone the example repository as shown bellow:
mkdir sse
git clone https://github.com/hearit-io/fastify-redis-channels-sse-example sse
cd sse
npm install
To try this example make sure you have up and running Redis server on the default host localhost
and port 6379
. For more info about the installation see on Redis download page.
Start a server with a command:
node server
Open on a browser window the url http://localhost:3333
Open a new shell and produce a SSE message by calling for example:
cd sse
node produce 'Hello Wold'
You should see an updated information on a browser window.
Emil Usunov
MIT