refactor(ui): use JSON format as runtime configuration
[e-mobility-charging-stations-simulator.git] / ui / web / src / main.ts
CommitLineData
66a7748d 1import { createApp } from 'vue'
9d76f5ec
JB
2import router from '@/router'
3import { UIClient } from '@/composables'
4import App from '@/App.vue'
32de5a57 5
9d76f5ec
JB
6const app = createApp(App)
7
8fetch('/config.json')
9 .then(response => response.json())
10 .then(config => {
11 app.config.globalProperties.$UIClient = UIClient.getInstance(config)
12 app.use(router).mount('#app')
13 })