refactor(ui): use JSON format as runtime configuration
[e-mobility-charging-stations-simulator.git] / ui / web / src / main.ts
1 import { createApp } from 'vue'
2 import router from '@/router'
3 import { UIClient } from '@/composables'
4 import App from '@/App.vue'
5
6 const app = createApp(App)
7
8 fetch('/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 })