set path api
This commit is contained in:
parent
6d8a9f8213
commit
3858259b56
2 changed files with 26 additions and 28 deletions
|
|
@ -1,34 +1,34 @@
|
|||
/**config api */
|
||||
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')
|
||||
// if (process.env.VUE_APP_TEST) {
|
||||
// env = "test";
|
||||
// }
|
||||
|
||||
const config = ref<any>({
|
||||
development: {
|
||||
API_URI: "https://localhost:7006/api/v1",
|
||||
// API_URI: "https://wsh.frappet.com",
|
||||
MEET_URI: "meet.frappet.com",
|
||||
},
|
||||
test: {
|
||||
API_URI: "http://localhost:5010/api/v1",
|
||||
MEET_URI: "meet.frappet.com",
|
||||
},
|
||||
production: {
|
||||
// API_URI: "https://localhost:5010",
|
||||
API_URI: `${window.location.protocol}//api-${window.location.host}/api/v1`,
|
||||
MEET_URI: "meet.frappet.com",
|
||||
},
|
||||
});
|
||||
development: {
|
||||
API_URI: 'https://localhost:7007/api/v1',
|
||||
// API_URI: "https://wsh.frappet.com",
|
||||
MEET_URI: 'meet.frappet.com'
|
||||
},
|
||||
test: {
|
||||
API_URI: 'http://localhost:5010/api/v1',
|
||||
MEET_URI: 'meet.frappet.com'
|
||||
},
|
||||
production: {
|
||||
// API_URI: "https://localhost:5010",
|
||||
API_URI: `${window.location.protocol}//api-${window.location.host}/api/v1`,
|
||||
MEET_URI: 'meet.frappet.com'
|
||||
}
|
||||
})
|
||||
|
||||
const API_URI = ref<string>(config.value[env.value].API_URI);
|
||||
const MEET_URI = ref<string>(config.value[env.value].MEET_URI);
|
||||
const API_URI = ref<string>(config.value[env.value].API_URI)
|
||||
const MEET_URI = ref<string>(config.value[env.value].MEET_URI)
|
||||
|
||||
export default {
|
||||
env: env.value,
|
||||
config: config.value,
|
||||
API_URI: API_URI.value,
|
||||
MEET_URI: MEET_URI.value,
|
||||
};
|
||||
env: env.value,
|
||||
config: config.value,
|
||||
API_URI: API_URI.value,
|
||||
MEET_URI: MEET_URI.value
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,8 @@ const initOptions = {
|
|||
// realm: "bma-ehr",
|
||||
// clientId: "bma-ehr-vue3",
|
||||
url: 'https://identity.frappet.com/',
|
||||
// realm: 'exam_test',
|
||||
// clientId: 'exam_vue3'
|
||||
realm: 'bma-ehr',
|
||||
clientId: 'bma-ehr-vue3'
|
||||
realm: 'bma-ehr-exam',
|
||||
clientId: 'bma-ehr-exam-vue3'
|
||||
} //option keycloak ที่จะ connect
|
||||
|
||||
const keycloak = Keycloak(initOptions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue