Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

[FIX] Use PORT env var in Vite dev server config (#1829)

Jaseem Jas1c859ffca0d7
diff --git a/frontend/vite.config.js b/frontend/vite.config.js
index 21cc81fb0..d3310e847 100644
--- a/frontend/vite.config.js
+++ b/frontend/vite.config.js
@@ -112,7 +112,7 @@ export default defineConfig(({ mode }) => {
// Server configuration for development
server: {
host: "0.0.0.0",
- port: 3000,
+ port: Number(env.PORT) || 3000,
// Docker-specific: Enable polling for file watching
watch: {
usePolling: true,
@@ -120,8 +120,10 @@ export default defineConfig(({ mode }) => {
},
// HMR configuration for Docker environments
hmr: {
- port: 3000,
- clientPort: env.WDS_SOCKET_PORT ? Number(env.WDS_SOCKET_PORT) : 3000,
+ port: Number(env.PORT) || 3000,
+ clientPort: env.WDS_SOCKET_PORT
+ ? Number(env.WDS_SOCKET_PORT)
+ : (Number(env.PORT) || 3000),
},
// Proxy configuration (similar to setupProxy.js in CRA)
proxy: