main.js 1.37 KB
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
// Add this line
import App from './App'
import router from './router'
import axios from 'axios'

// Import the Auth0 configuration
import { domain, clientId } from "../auth_config.json"

// Import the plugin here
import { Auth0Plugin } from "./auth"
import Vuelidate from 'vuelidate'
import moment from 'moment'
import Toaster from 'v-toaster'
import 'v-toaster/dist/v-toaster.css'
 
// You need a specific loader for CSS files like https://github.com/webpack/css-loader

// optional set default imeout, the default is 10000 (10 seconds).
Vue.use(Toaster, {timeout: 5000})
Vue.use(Vuelidate)
    // Install the authentication plugin here
Vue.use(Auth0Plugin, {
    domain,
    clientId,
    redirect: false,
    onRedirectCallback: appState => {
        router.push(
            appState && appState.targetUrl ?
            appState.targetUrl :
            window.location.pathname
        );
    }
});

Vue.config.productionTip = false
// https://api.productgrowth.org/pg
// http://174.138.121.70:3006/pg
// http://174.138.121.70:3006/pd
Vue.prototype.moment = moment
axios.defaults.baseURL = 'http://174.138.121.70:3006/pd'

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    components: { App },
    template: '<App/>'
})