π OpenHands: AI-Driven Development
docs(frontend): add environment variables in .env.sample and README (#7401)
Caique2a5e17d54820
diff --git a/frontend/.env.sample b/frontend/.env.sampleindex ff98ab15aa..1a700c432f 100644--- a/frontend/.env.sample+++ b/frontend/.env.sample@@ -1,2 +1,8 @@VITE_BACKEND_BASE_URL="localhost:3000" # Backend URL without protocol (e.g. localhost:3000)-VITE_MOCK_API="false" # true or false+VITE_BACKEND_HOST="127.0.0.1:3000" # Backend host with port for API connections+VITE_MOCK_API="false" # Enable/disable API mocking with MSW (true or false)+VITE_MOCK_SAAS="false" # Simulate SaaS mode in development (true or false)+VITE_USE_TLS="false" # Use HTTPS/WSS for backend connections (true or false)+VITE_FRONTEND_PORT="3001" # Port to run the frontend application+VITE_INSECURE_SKIP_VERIFY="false" # Skip TLS certificate verification (true or false)+# VITE_GITHUB_TOKEN="" # GitHub token for repository access (used in some tests)diff --git a/frontend/README.md b/frontend/README.mdindex b5173406c2..5e46ffe62e 100644--- a/frontend/README.md+++ b/frontend/README.md@@ -79,7 +79,20 @@ npm run dev:mock or npm run dev:mock:saas### Environment Variables-TODO+The frontend application uses the following environment variables:++| Variable | Description | Default Value |+| --------------------------- | ---------------------------------------------------------------------- | ---------------- |+| `VITE_BACKEND_BASE_URL` | The backend hostname without protocol (used for WebSocket connections) | `localhost:3000` |+| `VITE_BACKEND_HOST` | The backend host with port for API connections | `127.0.0.1:3000` |+| `VITE_MOCK_API` | Enable/disable API mocking with MSW | `false` |+| `VITE_MOCK_SAAS` | Simulate SaaS mode in development | `false` |+| `VITE_USE_TLS` | Use HTTPS/WSS for backend connections | `false` |+| `VITE_FRONTEND_PORT` | Port to run the frontend application | `3001` |+| `VITE_INSECURE_SKIP_VERIFY` | Skip TLS certificate verification | `false` |+| `VITE_GITHUB_TOKEN` | GitHub token for repository access (used in some tests) | - |++You can create a `.env` file in the frontend directory with these variables based on the `.env.sample` file.### Project Structure