Implemented subscription logic

This commit is contained in:
2024-03-10 23:06:00 +01:00
parent 39869d605c
commit 87d47f8ce8
11 changed files with 125 additions and 43 deletions

View File

@ -102,7 +102,7 @@ ApiHandler::$indexPage = <<<ENDHTML
</head>
<body>
<script type="text/javascript">
const events = new EventSource("http://127.0.0.1:9000/.well-known/mercure");
const events = new EventSource("http://127.0.0.1:9000/.well-known/mercure?topic=https://example.com/books/1");
events.onmessage = msg => console.log(msg);
</script>
</body>