Skip to content

Instantly share code, notes, and snippets.

@ggagosh
Created May 5, 2023 17:17
Show Gist options
  • Save ggagosh/0850fd0100f17e2bc040095a917c0342 to your computer and use it in GitHub Desktop.
Save ggagosh/0850fd0100f17e2bc040095a917c0342 to your computer and use it in GitHub Desktop.
SSE warning example
@Sse('sse')
sse() {
const subject = new Subject();
setTimeout(() => {
Array.from(Array(1000).keys()).forEach((i) => {
subject.next({
data: {
message: `Message #${i}`,
},
});
});
}, 1000);
return subject;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment