import Vue from 'vue'
import App from './App.vue'
import FlowService from './services/flowservice'

import router from './router'

let targetws = 'ws://' + window.location.host + '/conn'
if (window.location.protocol === 'https:') {
  targetws = 'wss://' + window.location.host + '/conn'
}
Vue.use(FlowService, {location: targetws})

window.app = new Vue({
  el: '#app',
  router,
  render: h => h(App)
})
