socket.js 231 Bytes RawBlameHistoryPermalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 const state = { path: window.$fetchConfig.baseURL, socket: '' } const mutations = {} const actions = { connect({ state }) { state.socket = new WebSocket(this.path) } } export default { state, mutations, actions }