uci-websocket-client/example/client/src/boot/socket.js

11 lines
235 B
JavaScript

import WebSocket from '@uci/websocket-client'
const ws = new WebSocket(process.env.WSS || 'ws://0.0.0.0:8090')
export { ws }
// leave the export, even if you don't use it
export default ({ Vue }) => {
Vue.prototype.$socket = ws
}