Skip to content

Commit

Permalink
Added env vars to ui and api URL (FlowiseAI#3141)
Browse files Browse the repository at this point in the history
* feat: add environment vars to split application in different deployments for better scalability

* update: package.json

added start script ui

---------

Co-authored-by: patrick <[email protected]>
  • Loading branch information
patrickreinan and patrickalvesexperian authored Sep 24, 2024
1 parent a6a0398 commit 383a713
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/ui/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
VITE_PORT=8080

# VITE_API_BASE_URL=http://localhost:3000
# VITE_UI_BASE_URL=http://localhost:3000
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
},
"scripts": {
"dev": "vite",
"start": "vite",
"build": "vite build",
"clean": "rimraf build",
"nuke": "rimraf build node_modules .turbo"
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/store/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 383a713

Please sign in to comment.