1
0
Fork 0
mirror of https://github.com/tokio-rs/axum.git synced 2024-12-15 19:25:54 +01:00
axum/examples/sse/assets/script.js
David Pedersen 6c9651c14a
Move all examples to their own crates ()
This makes it much clearer which dependencies each example has.
2021-08-18 00:49:01 +02:00

5 lines
140 B
JavaScript

var eventSource = new EventSource('sse');
eventSource.onmessage = function(event) {
console.log('Message from server ', event.data);
}