Server-Sent Events: the alternative to WebSockets you should be using - germano.dev
vendredi 4 mars 2022 à 21:41const es = new EventSource("https://localhost/sse");
es.onopen = e => console.log("EventSource open");
es.addEventListener("message", e => console.log(e.data));
// Event listener for custom event
es.addEventListener( "join", e => console.log(`${e.data} joined`))