working websocket from vue to tornado

This commit is contained in:
ori agranat
2019-03-23 23:42:24 +02:00
parent ec0b07db61
commit a69bd84273
8 changed files with 47 additions and 22 deletions

View File

@@ -4,10 +4,11 @@ import VueRouter from 'vue-router'
import iView from 'iview';
import router from "./routes";
import '../theme/index.less';
import VueNativeSock from 'vue-native-websocket'
Vue.use(VueRouter);
Vue.use(iView);
Vue.use(VueNativeSock,'ws://'+location.hostname+':8888/websocket');
Vue.config.productionTip = false
new Vue({