Consuming spark publish events with Node.js

I finally figured out how to consume the spark SSE events from a node.js program - have a look at the blog post here. Thx to Spark and especially the Spark CLI creator - in the end the trick is to use not the EventSource lib that exists for node.js but the awesome request library. The data exposed in the callbacks then needs to be parsed according to the SSE spec.


Cool, thanks for posting! How is ThingsCon going? :slight_smile:

@Dave many Thx for the spark CLI. It’s a lot of fun here. The workshop with Zach was awesome. Cheers to MI.


looks like the link is broken

Give the SparkJS library a try, it’s made for these things :slight_smile: