Skip to main content
Module

x/oak/examples/resources/sseServer_index.html

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
File
<!DOCTYPE html><html> <head></head> <body> <h1>Hello world!</h1> <ul id="events"></ul> <script> const sse = new EventSource("/sse"); const ul = document.getElementById("events"); sse.onmessage = (evt) => { const li = document.createElement("li"); li.textContent = `message: ${evt.data}`; ul.appendChild(li); }; </script> </body></html>