Advertisement
Masterchoc

Untitled

May 12th, 2018
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import cfg from '../../config'
  2. import Vue from 'vue'
  3. import VueSocketio from 'vue-socket.io'
  4.  
  5. let endpoint = process.env.NODE_ENV == 'production'
  6.     ? cfg.hostname
  7.     : `http://${cfg.domain.dev}:${cfg.port}`;
  8.  
  9. Vue.use(VueSocketio, endpoint, {
  10.     reconnection: true,
  11.     reconnectionDelay: 1000,
  12.     reconnectionDelayMax : 5000,
  13.     reconnectionAttempts: Infinity
  14. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement