<reponame>alexeykulakov/business_data_stack<filename>conf/cube/node_modules/.tmp/cubejs-playground-templates-master/packages/vue-ui-test/scaffolding/src/main.js<gh_stars>0import Vue from 'vue';
import VueRouter from 'vue-router';
import VueApollo from 'vue-apollo';
import cubejs from '@cubejs-client/core';

import App from './App.vue';
import vuetify from './plugins/vuetify';
import Explore from './pages/explore/Explore.vue';
import Dashboard from './pages/dashboard/Dashboard.vue';
import apolloClient from './graphql/client';

Vue.use(VueApollo);

const apolloProvider = new VueApollo({
  defaultClient: apolloClient,
});

const API_URL = 'https://ecom.cubecloudapp.dev';
const CUBEJS_TOKEN =
  '949d1u22cbffbrarjh182eig55721odj0fdi5cuDZ2t3OSrPOMoc3B1_pwhnWj4ZmM3FHEX7Aus';

const cubejsApi = cubejs(CUBEJS_TOKEN, {
  apiUrl: `${API_URL}/cubejs-api/v1`,
});

const router = new VueRouter({
  routes: [
    { path: '/', component: Explore, props: { cubejsApi } },
    { path: '/explore', component: Explore, props: { cubejsApi } },
    { path: '/dashboard', component: Dashboard, props: { cubejsApi } },
  ],
});

Vue.config.productionTip = false;

Vue.use(VueRouter);

new Vue({
  router,
  vuetify,
  apolloProvider,
  render: (h) => h(App),
}).$mount('#app');
