Using node
and express
.
npm i
node server.js
The server must be running on port 3000
.
You can see it working on the browser accessing http://localhost:3000/.
You can also check the events on your terminal running:
curl localhost:3000/stream
Based on Josh's and Ggorlen's answers to this Stackoverflow question.