pilotwings/frontend/main.ts
2024-11-03 08:37:04 +01:00

19 lines
475 B
TypeScript

import 'bulma/css/bulma.min.css'
import 'font-awesome/css/font-awesome.min.css'
import App from './App.vue'
import { createApp } from 'vue'
import router from './router'
declare module 'vue' {
interface ComponentCustomProperties {
$api: string
}
}
const app = createApp(App)
app.config.globalProperties.$api = import.meta.env.PROD
? `${import.meta.env.BASE_URL}api`
: `http://localhost:${import.meta.env.API_PORT ?? 5000}/api`
app.use(router)
app.mount('#app')