Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var EventSource = require("eventsource");
var es = new EventSource(
es.onmessage = function (message) {
var result = ? JSON.parse( : message;
console.log("New payment:");
es.onerror = function (error) {
console.log("An error occurred!");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment