pilotwings/frontend/main.ts

19 lines
475 B
TypeScript
Raw Normal View History

2024-11-03 07:37:04 +00:00
import 'bulma/css/bulma.min.css'
import 'font-awesome/css/font-awesome.min.css'
2024-11-02 18:16:32 +00:00
import App from './App.vue'
2024-11-02 21:43:27 +00:00
import { createApp } from 'vue'
2024-11-02 18:16:32 +00:00
import router from './router'
2024-11-03 07:37:04 +00:00
declare module 'vue' {
interface ComponentCustomProperties {
$api: string
}
}
2024-11-02 18:16:32 +00:00
const app = createApp(App)
2024-11-02 21:43:27 +00:00
app.config.globalProperties.$api = import.meta.env.PROD
? `${import.meta.env.BASE_URL}api`
2024-11-03 16:04:28 +00:00
: `http://localhost:${import.meta.env.API_PORT ?? 8000}/api`
2024-11-02 18:16:32 +00:00
app.use(router)
app.mount('#app')