A simple script which collects https posts and writes out to the brower through websockets using socket.io. A unique ref must be supplied using the "ref" querystring parameter. The ref value provided in the browser must match that being used in the post. A GUID might be a good idea for this.
- Start the server
- Browse to the client, using a GUID to isolate your notifications
- Test out the notifications by posting something, e.g. using curl
curl -X POST -d 'BANG' http://localhost:8000?ref=17737123673c4758a5bb2afaaf238427
- See the browser output:
Supporting different formats for different content types