I tried downloading the Pusher.js from GitHub and put it in the sandbox directory, then I uploaded the code from right-hand side of the IDE, but still getting following error,
Uncaught ReferenceError: "Pusher" is not defined
at line 1 col 5
new Pusher(PUSHER_KEY, {}, function(pusher) {
Can anyone help?
require("Pusher");
var PUSHER_KEY = 'XXXXXXXXXXXXX';
new Pusher(PUSHER_KEY, {}, function(pusher) {
var testChannel = pusher.subscribe('test_channel');
testChannel.bind('my_event', function(data) {
console.log('Got a message:', data);
});
});
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I tried downloading the Pusher.js from GitHub and put it in the sandbox directory, then I uploaded the code from right-hand side of the IDE, but still getting following error,
Can anyone help?