Created
June 25, 2020 11:48
Snippet from node app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Pusher = require('pusher'); | |
var pusher = new Pusher({ | |
appId: 'APP_ID', | |
key: 'APP_KEY', | |
secret: 'APP_SECRET', | |
cluster: 'APP_CLUSTER' | |
}); | |
// Logic which will then trigger events to a channel | |
function trigger(){ | |
... | |
... | |
pusher.trigger('my-channel', 'my-event', {"message": "hello world"}); | |
... | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment