2023-03-16 00:35:08 +07:00
|
|
|
/**config api */
|
2023-03-23 12:30:14 +07:00
|
|
|
import { ref } from 'vue'
|
2023-03-16 00:35:08 +07:00
|
|
|
|
2023-03-23 12:30:14 +07:00
|
|
|
const env = ref<string>(process.env.NODE_ENV || 'development')
|
2023-05-10 14:59:54 +07:00
|
|
|
export const apiUrlConfig = import.meta.env.VITE_API_URI_CONFIG
|
2023-03-16 00:35:08 +07:00
|
|
|
|
|
|
|
|
const config = ref<any>({
|
2023-03-23 12:30:14 +07:00
|
|
|
development: {
|
2023-05-04 17:05:40 +07:00
|
|
|
// API_URI: 'https://localhost:7007/api/v1',
|
2023-05-10 14:59:54 +07:00
|
|
|
API_URI: apiUrlConfig,
|
2023-03-23 12:30:14 +07:00
|
|
|
MEET_URI: 'meet.frappet.com'
|
|
|
|
|
},
|
|
|
|
|
test: {
|
|
|
|
|
API_URI: 'http://localhost:5010/api/v1',
|
|
|
|
|
MEET_URI: 'meet.frappet.com'
|
|
|
|
|
},
|
|
|
|
|
production: {
|
|
|
|
|
// API_URI: "https://localhost:5010",
|
2023-05-10 14:59:54 +07:00
|
|
|
API_URI: apiUrlConfig,
|
2023-03-23 12:30:14 +07:00
|
|
|
MEET_URI: 'meet.frappet.com'
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-03-16 00:35:08 +07:00
|
|
|
|
2023-03-23 12:30:14 +07:00
|
|
|
const API_URI = ref<string>(config.value[env.value].API_URI)
|
|
|
|
|
const MEET_URI = ref<string>(config.value[env.value].MEET_URI)
|
2023-03-16 00:35:08 +07:00
|
|
|
|
|
|
|
|
export default {
|
2023-03-23 12:30:14 +07:00
|
|
|
env: env.value,
|
|
|
|
|
config: config.value,
|
|
|
|
|
API_URI: API_URI.value,
|
|
|
|
|
MEET_URI: MEET_URI.value
|
|
|
|
|
}
|