count-anything/app/javascript/channels/count_channel.js

17 lines
417 B
JavaScript
Raw Normal View History

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
}
});