เพิ่ม env
This commit is contained in:
parent
66eb2bebca
commit
69a3bd3811
3 changed files with 9 additions and 6 deletions
3
.env
3
.env
|
|
@ -1,3 +1,4 @@
|
||||||
VITE_REALM_KEYCLOAK: "bma-ehr"
|
VITE_REALM_KEYCLOAK: "bma-ehr"
|
||||||
VITE_CLIENTID_KEYCLOAK: "HRIS_ADMIN"
|
VITE_CLIENTID_KEYCLOAK: "HRIS_ADMIN"
|
||||||
VITE_URL_KEYCLOAK: "https://id.frappet.synology.me/"
|
VITE_URL_KEYCLOAK: "https://id.frappet.synology.me/"
|
||||||
|
VITE_API_URI_CONFIG: "https://bma-ehr.frappet.synology.me/api/v1"
|
||||||
|
|
@ -13,6 +13,7 @@ do
|
||||||
sed -i 's|VITE_URL_KEYCLOAK|'${VITE_URL_KEYCLOAK}'|g' $file
|
sed -i 's|VITE_URL_KEYCLOAK|'${VITE_URL_KEYCLOAK}'|g' $file
|
||||||
sed -i 's|VITE_API_PUBLISH_URL|'${VITE_API_PUBLISH_URL}'|g' $file
|
sed -i 's|VITE_API_PUBLISH_URL|'${VITE_API_PUBLISH_URL}'|g' $file
|
||||||
sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file
|
sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file
|
||||||
|
sed -i 's|VITE_API_URI_CONFIG|'${VITE_API_URI_CONFIG}'|g' $file
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
import { ref } from "vue"
|
import { ref } from "vue"
|
||||||
|
|
||||||
const env = ref<string>(process.env.NODE_ENV || "development")
|
const env = ref<string>(process.env.NODE_ENV || "development")
|
||||||
|
export const apiUrlConfig = import.meta.env.VITE_API_URI_CONFIG
|
||||||
// export const apiUrlConfigPublish = import.meta.env.VITE_API_PUBLISH_URL;
|
// export const apiUrlConfigPublish = import.meta.env.VITE_API_PUBLISH_URL;
|
||||||
// export const apiUrlConfigReport = import.meta.env.VITE_API_REPORT_URL;
|
// export const apiUrlConfigReport = import.meta.env.VITE_API_REPORT_URL;
|
||||||
// if (process.env.VUE_APP_TEST) {
|
// if (process.env.VUE_APP_TEST) {
|
||||||
|
|
@ -27,11 +28,11 @@ const config = ref<any>({
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
// API_URI: "https://localhost:5010",
|
// API_URI: "https://localhost:5010",
|
||||||
API_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
|
API_URI: apiUrlConfig,
|
||||||
API_URI_ORG_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว
|
API_URI_ORG_SERVICE: apiUrlConfig, //ใช้ชั่วคราว
|
||||||
API_URI_ORG_EMPLOYEE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว
|
API_URI_ORG_EMPLOYEE_SERVICE: apiUrlConfig, //ใช้ชั่วคราว
|
||||||
API_URI_PROFILE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`,
|
API_URI_PROFILE_SERVICE: apiUrlConfig,
|
||||||
API_REPORT_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
|
API_REPORT_URI: apiUrlConfig,
|
||||||
MEET_URI: "meet.frappet.com",
|
MEET_URI: "meet.frappet.com",
|
||||||
API_REPORT2_URI: `${window.location.protocol}//${window.location.host}/api/v2`,
|
API_REPORT2_URI: `${window.location.protocol}//${window.location.host}/api/v2`,
|
||||||
// API_REPORT_TEMPLATE_URI: apiUrlConfigReport,
|
// API_REPORT_TEMPLATE_URI: apiUrlConfigReport,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue