From d130b36742db0b77947609f36645486dbd9756c2 Mon Sep 17 00:00:00 2001 From: AndzejsP Date: Thu, 4 May 2023 09:59:12 +0300 Subject: [PATCH] added baseurl for api --- .gitignore | 1 + web/.env | 1 + web/src/views/DiscussionsView.vue | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2f39bba1..abaaeea6 100644 --- a/.gitignore +++ b/.gitignore @@ -167,3 +167,4 @@ backends/ !backends/__init__.py web/.env.build web/.env.dev +web/.env.development diff --git a/web/.env b/web/.env index ed602e42..6cdee019 100644 --- a/web/.env +++ b/web/.env @@ -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 diff --git a/web/src/views/DiscussionsView.vue b/web/src/views/DiscussionsView.vue index 9b0124d5..601d731d 100644 --- a/web/src/views/DiscussionsView.vue +++ b/web/src/views/DiscussionsView.vue @@ -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 {