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

12 lines
278 B
JavaScript

// import WebSocket from '@uci/websocket-client'
import WebSocket from '../../../../src'
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
}