2
0
mirror of https://github.com/tenrok/vue-native-websocket.git synced 2026-06-08 07:32:26 +03:00

add import vue in readme

This commit is contained in:
whitekkk
2016-11-28 08:53:05 +07:00
parent a172f0219a
commit f21cb5dfa6
+4 -3
View File
@@ -11,19 +11,20 @@ socket.io implemantation for Vuejs 2.0 and 1.0
``` bash
npm install vue-socket.io@1.0.2 --save
```
## Usage
``` js
import Vue from 'vue';
import VueSocketio from 'vue-socket.io';
Vue.use(VueSocketio, 'http://socketserver.com:1923'); // Automaticly socket connect from url string
/*
import socketio from 'socket.io-client';
var ioInstance = socketio('http://socketserver.com:1923');
Vue.use(VueSocketio, ioInstance); // bind custom socketio instance
*/