Use backend server url

Change-Id: Ic4dc430a52a080205863ac393af2c4d903bf6578
This commit is contained in:
ipatini 2024-05-16 20:22:30 +03:00
parent a84a07c7df
commit 004224a225
8 changed files with 11 additions and 8 deletions

View File

@ -1,2 +1,2 @@
VUE_APP_BACKEND_URL=http://127.0.0.1:8001 VUE_APP_BACKEND_URL=https://cfsb-backend.cd.nebulouscloud.eu
VITE_BACKEND_URL=http://127.0.0.1:8001 VITE_BACKEND_URL=https://cfsb-backend.cd.nebulouscloud.eu

View File

@ -132,7 +132,7 @@
</style> </style>
<script> <script>
export const backendURL = import.meta.env.VITE_BACKEND_URL; export const backendURL = process.env.VITE_BACKEND_URL;
const apiURL = backendURL; const apiURL = backendURL;
export default { export default {
name: 'App', name: 'App',

View File

@ -26,7 +26,7 @@
<script> <script>
export const backendURL = import.meta.env.VITE_BACKEND_URL; export const backendURL = process.env.VITE_BACKEND_URL;
const apiURL = backendURL; const apiURL = backendURL;
import HierarchicalCategoryList from "@/components/HierarchicalCategoryList.vue"; import HierarchicalCategoryList from "@/components/HierarchicalCategoryList.vue";

View File

@ -77,7 +77,7 @@
</template> </template>
<script> <script>
export const backendURL = import.meta.env.VITE_BACKEND_URL; export const backendURL = process.env.VITE_BACKEND_URL;
const apiURL = backendURL; const apiURL = backendURL;
export default { export default {
data() { data() {

View File

@ -45,7 +45,7 @@
</template> </template>
<script> <script>
export const backendURL = import.meta.env.VITE_BACKEND_URL; export const backendURL = process.env.VITE_BACKEND_URL;
const apiURL = backendURL; const apiURL = backendURL;
import Chart from 'chart.js/auto'; import Chart from 'chart.js/auto';

View File

@ -73,7 +73,7 @@
</template> </template>
<script> <script>
export const backendURL = import.meta.env.VITE_BACKEND_URL; export const backendURL = process.env.VITE_BACKEND_URL;
const apiURL = backendURL; const apiURL = backendURL;
export default { export default {
data() { data() {

View File

@ -55,7 +55,7 @@
</template> </template>
<script> <script>
export const backendURL = import.meta.env.VITE_BACKEND_URL; export const backendURL = process.env.VITE_BACKEND_URL;
const apiURL = backendURL; const apiURL = backendURL;
import {useRouter} from 'vue-router'; import {useRouter} from 'vue-router';

View File

@ -12,5 +12,8 @@ export default defineConfig({
alias: { alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)) '@': fileURLToPath(new URL('./src', import.meta.url))
} }
},
define: {
'process.env.VITE_BACKEND_URL': JSON.stringify(process.env.VITE_BACKEND_URL || "https://cfsb-backend.cd.nebulouscloud.eu")
} }
}) })