Experimental
channel path; <namespace>/<channel>
Optional
options: EventsOptionsrequest overrides: authMode
, authToken
const channel = await events.connect("default/channel")
channel.subscribe({
next: (data) => { console.log(data) },
error: (err) => { console.error(err) },
})
// authMode override
const channel = await events.connect("default/channel", { authMode: "userPool" })
API may change in future versions
Establish a WebSocket connection to an Events channel