added baseurl for api

This commit is contained in:
AndzejsP 2023-05-04 09:59:12 +03:00
parent 0c25ea4876
commit d130b36742
3 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -167,3 +167,4 @@ backends/
!backends/__init__.py
web/.env.build
web/.env.dev
web/.env.development

View File

@ -1,3 +1,4 @@
VITE_GPT4ALL_API = http://localhost:9600 # http://localhost:9600
VITE_GPT4ALL_API_CHANGE_ORIGIN = 0 # FALSE
VITE_GPT4ALL_API_SECURE = 0 # FALSE
VITE_GPT4ALL_API_BASEURL = / # FALSE

View File

@ -111,7 +111,7 @@
import axios from "axios";
import { nextTick } from 'vue'
//axios.defaults.baseURL = '/api/'; // Use this for external development not for production
axios.defaults.baseURL = import.meta.env.VITE_GPT4ALL_API_BASEURL // Use this for external development not for production
import websocket from '@/services/websocket.js';
export default {