From 92ee7c0291608885fbe69686cb139bf22f82e887 Mon Sep 17 00:00:00 2001 From: Metin Seylan Date: Sun, 18 Nov 2018 14:31:54 +0300 Subject: [PATCH] installation added --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 11c5c79..f6d8c7a 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,25 @@ npm install vue-socket.io --save ``` +``` javascript +import Vue from 'vue' +import store from './store' +import App from './App.vue' +import VueSocketIO from 'vue-socket.io' + +Vue.use(new VueSocketIO({ + debug: true, + connection: 'http://metinseylan.com:1992', + vuex: { + store, + actionPrefix: 'SOCKET_', + mutationPrefix: 'SOCKET_' + } +})) + +new Vue({ + router, + store, + render: h => h(App) +}).$mount('#app'); +``` \ No newline at end of file