REST Service for POPCORN - ILIAS
alex
2025-06-03 9348470eccb003d941f75c915a0941714378986a
using .env for base urls
2 files added
4 files modified
18 ■■■■ changed files
vite.config.js 2 ●●● patch | view | raw | blame | history
vue/.env 2 ●●●●● patch | view | raw | blame | history
vue/.env.production 2 ●●●●● patch | view | raw | blame | history
vue/src/App.vue 3 ●●●●● patch | view | raw | blame | history
vue/src/lib/api.js 4 ●●●● patch | view | raw | blame | history
vue/src/pages/KursDetail.vue 5 ●●●●● patch | view | raw | blame | history
vite.config.js
@@ -14,7 +14,7 @@
  ],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
      '@': fileURLToPath(new URL('./vue/src', import.meta.url))
    },
  },
  server: {
vue/.env
New file
@@ -0,0 +1,2 @@
VITE_API_BASE="/api"
VITE_ILIAS_BASE="http://localhost:8060"
vue/.env.production
New file
@@ -0,0 +1,2 @@
VITE_API_BASE="https://globusfm-dev2.minervis.com/popcorn/api"
VITE_ILIAS_BASE="https://globusfm-dev2.minervis.com"
vue/src/App.vue
@@ -6,6 +6,9 @@
import {ref, watch} from "vue"
import {useDebounceFn} from '@vueuse/core'
console.log("import.meta.env.VITE_API_BASE",import.meta.env.VITE_API_BASE)
console.log("import.meta.env.VITE_ILIAS_BASE",import.meta.env.VITE_ILIAS_BASE)
const apiToken = ref("")
function updateApiToken (evt) {
vue/src/lib/api.js
@@ -14,8 +14,8 @@
/////// CONSTANTS ////////////////////////////////////////////////////////////////
export const apiBase = "/api"
export const iliasBase = "http://localhost:8060"
export const apiBase = import.meta.env.VITE_API_BASE
export const iliasBase = import.meta.env.VITE_ILIAS_BASE
/////// KURS ////////////////////////////////////////////////////////////////
vue/src/pages/KursDetail.vue
@@ -28,13 +28,18 @@
   const dataKursTn = await getKursTn(kursId)
   console.log(dataKursTn)
   kursTn.value = dataKursTn
   console.log(222222222222,import.meta.env.VITE_TST)
}
const aaa = import.meta.env.VITE_TST
</script>
<template>
   <div>
      <pre>---{{aaa}}</pre>
      <h1>
         Kurs
         <small>{{ kurs?.title }}</small>