Add MIX_API_URL in env to be ref by webpack
This commit is contained in:
@@ -49,3 +49,5 @@ PUSHER_APP_SECRET=421b61fb5a8ecce477a6
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
# MIX_API_URL=apiujrah.arrahn
|
||||
MIX_API_URL=api.arrahn
|
||||
|
||||
Vendored
+5
-3
@@ -126,19 +126,21 @@ Vue.use(require('vue-pusher'), {
|
||||
}
|
||||
});
|
||||
|
||||
Vue.prototype.$api1 = 'http://api.arrahn/'
|
||||
Vue.prototype.$api1 = process.env.MIX_API_URL
|
||||
Vue.prototype.$username = document.querySelector("meta[name='user_name']").getAttribute('content');
|
||||
Vue.prototype.$userroles = document.querySelector("meta[name='user_roles']").getAttribute('content');
|
||||
|
||||
|
||||
let initial = 'KB2';
|
||||
let initialhostname = 'http://api.arrahn/';
|
||||
|
||||
let initialhostname = process.env.MIX_API_URL;
|
||||
let initialtahun = new Date().getFullYear();
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
$kodcaw: 'KB2',
|
||||
$hostname: 'http://api.arrahn/',
|
||||
|
||||
$hostname: process.env.MIX_API_URL,
|
||||
$tahun: new Date().getFullYear()
|
||||
},
|
||||
plugins: [createPersistedState()],
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
case 'JLI':
|
||||
case 'ARP':
|
||||
case '020303':{
|
||||
this.sethostname('http://api.arrahn')
|
||||
this.sethostname(process.env.MIX_API_URL);
|
||||
break;
|
||||
}
|
||||
case '010621':
|
||||
@@ -120,7 +120,8 @@
|
||||
this.sethostname('http://api2.arrahn')
|
||||
break;
|
||||
}
|
||||
default: this.sethostname('http://api.arrahn')
|
||||
|
||||
default: this.sethostname(process.env.MIX_API_URL)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user