I'm using Angular Live Set in my application, but despite using the code provided in the demo, I am not receiving any event in my controller.
var changeStreamUrl = '/api/todo/change-stream?_format=event-source';
var src = new EventSource(changeStreamUrl);
var changes = createChangeStream(src);
changes.on('data', function (update) {
console.log('new data');
});
changes.on('error', function (update) {
console.log('error data');
});
changes.on('end', function (update) {
console.log('end data');
});
I think the problem could be the server not emitting any event: how can I debug what's wrong with the endpoint?
--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/e1e9426d-981d-4aec-ab5a-d05643b47acb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.