I am new to studying JavaScript, and I have a function written in JavaScript that starts a simple countdown display, but I had a question how I can “run” this function by building a “one-way” connection from my project to extension using Reference (Link)? Please tell me what “EndPoint” should I use in this case?
And do I understand correctly - in order for all this to work, I need to write a file BackEnd.js, which will describe what will happen during the request from my project to the extension?
Basically you want to trigger a countdown on your extension from your backend or the configuration view?
If you want to send real time messages you can use the extension pubsub https://dev.twitch.tv/docs/extensions/reference/#send-extension-pubsub-message
And use the listen methods from the javascript helper to get the message sent by your server and call your javascript function on your frontend https://dev.twitch.tv/docs/extensions/reference/#helper-extensions
1 Like