diff --git a/packages/ui/.env.example b/packages/ui/.env.example index db18b4cda21..e336a6e539d 100644 --- a/packages/ui/.env.example +++ b/packages/ui/.env.example @@ -1 +1,4 @@ VITE_PORT=8080 + +# VITE_API_BASE_URL=http://localhost:3000 +# VITE_UI_BASE_URL=http://localhost:3000 \ No newline at end of file diff --git a/packages/ui/package.json b/packages/ui/package.json index 2076cba4a99..1025ea526c1 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -62,6 +62,7 @@ }, "scripts": { "dev": "vite", + "start": "vite", "build": "vite build", "clean": "rimraf build", "nuke": "rimraf build node_modules .turbo" diff --git a/packages/ui/src/store/constant.js b/packages/ui/src/store/constant.js index 02556d778de..de700ebe12d 100644 --- a/packages/ui/src/store/constant.js +++ b/packages/ui/src/store/constant.js @@ -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'