       
                }        
            });

            // The default behaviour for the EventSource is restarting on error. To prevent
            // this behaviour, close the eventsource on error.
            eventSource.addEventListener('error', (e) => {
                console.error('error', e);
                eventSource.close();
            });
        });
    </script>
</html>