Last active
May 13, 2021 09:00
-
-
Save dkhmelenko/bebbb8ec59e2bee3e4c233346e9d5932 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var source = new EventSource('/updates'); | |
source.addEventListener('time_update', function(event) { | |
console.log(event.data); | |
}); | |
... | |
source.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment