17 lines
417 B
JavaScript
17 lines
417 B
JavaScript
import consumer from "./consumer"
|
|
|
|
consumer.subscriptions.create("CountChannel", {
|
|
connected() {
|
|
// Called when the subscription is ready for use on the server
|
|
console.warn("Connected to CountChannel.");
|
|
},
|
|
|
|
disconnected() {
|
|
// Called when the subscription has been terminated by the server
|
|
},
|
|
|
|
received(data) {
|
|
// Called when there's incoming data on the websocket for this channel
|
|
}
|
|
});
|