Added env vars to ui and api URL (#3141)

* feat: add environment vars to split application in different deployments for better scalability

* update: package.json

added start script ui

---------

Co-authored-by: patrick <patrick.alves@br.experian.com>
This commit is contained in:
patrickreinan
2024-09-24 11:28:25 -03:00
committed by GitHub
parent a6a0398074
commit 383a7132a4
3 changed files with 6 additions and 2 deletions
+3
View File
@@ -1 +1,4 @@
VITE_PORT=8080
# VITE_API_BASE_URL=http://localhost:3000
# VITE_UI_BASE_URL=http://localhost:3000
+1
View File
@@ -62,6 +62,7 @@
},
"scripts": {
"dev": "vite",
"start": "vite",
"build": "vite build",
"clean": "rimraf build",
"nuke": "rimraf build node_modules .turbo"
+2 -2
View File
@@ -4,7 +4,7 @@ export const drawerWidth = 260
export const appDrawerWidth = 320
export const headerHeight = 80
export const maxScroll = 100000
export const baseURL = window.location.origin
export const uiBaseURL = window.location.origin
export const baseURL = import.meta.env.VITE_API_BASE_URL || window.location.origin
export const uiBaseURL = import.meta.env.VITE_UI_BASE_URL || window.location.origin
export const FLOWISE_CREDENTIAL_ID = 'FLOWISE_CREDENTIAL_ID'
export const REDACTED_CREDENTIAL_VALUE = '_FLOWISE_BLANK_07167752-1a71-43b1-bf8f-4f32252165db'