- Place
server.js
andsse.html
in the same directory npm install hapi nipple
node server.js
- In browser that supports Server Sent Events, navigate to
http://localhost:3000/sse.html
- Navigating to this page triggers a connection to
/stream
. /stream
connects to/events
and proxies the data back to the client./events
provides the actual Server Sent Events stream.