export function subscribe(endpoint: string) { const config = useRuntimeConfig(); const evtSource = new EventSource(config.public.endpoint + endpoint, { withCredentials: true, }); return evtSource; }