1 files added
6 files modified
| | |
| | | "dependencies": { |
| | | "@fastify/static": "^8.2.0", |
| | | "@vueuse/core": "^13.3.0", |
| | | "dotenv": "^16.5.0", |
| | | "fastify": "^5.3.3", |
| | | "lodash": "^4.17.21", |
| | | "mysql2": "^3.14.1", |
| | |
| | | "node": ">=6" |
| | | } |
| | | }, |
| | | "node_modules/dotenv": { |
| | | "version": "16.5.0", |
| | | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", |
| | | "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", |
| | | "license": "BSD-2-Clause", |
| | | "engines": { |
| | | "node": ">=12" |
| | | }, |
| | | "funding": { |
| | | "url": "https://dotenvx.com" |
| | | } |
| | | }, |
| | | "node_modules/eastasianwidth": { |
| | | "version": "0.2.0", |
| | | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", |
| | |
| | | "dependencies": { |
| | | "@fastify/static": "^8.2.0", |
| | | "@vueuse/core": "^13.3.0", |
| | | "dotenv": "^16.5.0", |
| | | "fastify": "^5.3.3", |
| | | "lodash": "^4.17.21", |
| | | "mysql2": "^3.14.1", |
| | |
| | | import { defineConfig } from 'vite' |
| | | import vue from '@vitejs/plugin-vue' |
| | | import vueDevTools from 'vite-plugin-vue-devtools' |
| | | import dotenv from 'dotenv' |
| | | |
| | | |
| | | let envPath = path.resolve(process.cwd(), "vue", '.env') |
| | | if (process.env.VITE_ENV == 'production') { |
| | | envPath += ".production" |
| | | } |
| | | console.log("> envPath", envPath) |
| | | dotenv.config({path: envPath}) |
| | | const routerBase = `${process.env.VITE_ROUTER_BASE}/ui` |
| | | console.log("+ ROUTER BASE IS", routerBase) |
| | | |
| | | // https://vite.dev/config/ |
| | | export default defineConfig({ |
| | | base: "/ui", |
| | | base: routerBase, |
| | | root: path.join(__dirname, 'vue'), |
| | | plugins: [ |
| | | vue(), |
| New file |
| | |
| | | VITE_API_BASE="/api" |
| | | VITE_ILIAS_BASE="http://localhost:8060" |
| | | VITE_ROUTER_BASE="" |
| | |
| | | |
| | | 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) |
| | | console.log("import.meta.env.VITE_ROUTER_BASE",import.meta.env.VITE_ILIAS_BASE) |
| | | console.log("import.meta.env.VITE_ROUTER_BASE",import.meta.env.VITE_ROUTER_BASE) |
| | | |
| | | const apiToken = ref("") |
| | | |
| | |
| | | console.log(dataKursTn) |
| | | kursTn.value = dataKursTn |
| | | |
| | | console.log(222222222222,import.meta.env.VITE_TST) |
| | | } |
| | | |
| | | const aaa = import.meta.env.VITE_TST |
| | |
| | | <template> |
| | | |
| | | <div> |
| | | <pre>---{{aaa}}</pre> |
| | | <h1> |
| | | Kurs |
| | | <small>{{ kurs?.title }}</small> |
| | | <!-- <small>{{ user?.firstname }} {{ user?.lastname }}</small>--> |
| | | </h1> |
| | | <p v-if="error">{{ error }}</p> |
| | | |
| | |
| | | import Kurse from './pages/Kurse.vue' |
| | | import KursDetail from './pages/KursDetail.vue' |
| | | |
| | | const base = import.meta.env.VITE_ROUTER_BASE |
| | | |
| | | const routes = [ |
| | | { path: `${base}/`, redirect: "/user" }, |
| | | { path: `${base}/ui/user`, component: Users }, |
| | | { path: `${base}/ui/user/:userId`, component: UserDetail }, |
| | | { path: `${base}/ui/kurs`, component: Kurse }, |
| | | { path: `${base}/ui/kurs/:kursId`, component: KursDetail }, |
| | | { path: `/`, redirect: "/user" }, |
| | | { path: `/ui/user`, component: Users }, |
| | | { path: `/ui/user/:userId`, component: UserDetail }, |
| | | { path: `/ui/kurs`, component: Kurse }, |
| | | { path: `/ui/kurs/:kursId`, component: KursDetail }, |
| | | ] |
| | | console.log(routes) |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHistory(), |