main/view/main.js

34 lines
756 B
JavaScript
Executable File

/* (1) Imports
---------------------------------------------------------*/
/* (1) NPM libs */
import Vue from 'vue'
/* (2) Internal libs */
import {API} from './lib/api-es6'
import {WSClient,WSClientBuilder} from './lib/ws-client-es6'
/* (3) Vues */
import wrapper_vue from './vue/wrapper.vue'
/* (2) Initialisation
---------------------------------------------------------*/
/* (1) API */
window.api = new API("http://ndli1718/api/v/1.0/");
/* (2) wsclient */
window.wsc = new WSClientBuilder("wss://websocket.xdrm.io");
/* (3) global store init */
require('./vue-config');
window.gstore.add('server', window._SERVER);
/* (4) Render view */
new Vue({
el: '#main-vue',
render: h => h(wrapper_vue),
data: {
gstore: window.gstore.data
}
})