uci-base/examples/ws-fio-client/src/boot/socket.js

12 lines
284 B
JavaScript

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