Skip to content

Instantly share code, notes, and snippets.

@abishekrsrikaanth
Created October 24, 2019 05:34
Show Gist options
  • Save abishekrsrikaanth/10f89cb32b18387ce4875ae184aabbf4 to your computer and use it in GitHub Desktop.
Save abishekrsrikaanth/10f89cb32b18387ce4875ae184aabbf4 to your computer and use it in GitHub Desktop.
import Vue from 'vue';
import PubNubVue from 'pubnub-vue';
import App from './App';
Vue.use(PubNubVue, {
subscribeKey: 'YOUR SUBSCRIBE KEY HERE',
publishKey: 'YOUR PUBLISH KEY HERE'
});
new Vue({
el: '#app',
template: '<App/>',
components: {
App
},
mounted(){
this.$pnSubscribe({
channels: ['ch1', 'ch2']
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment