mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
docs(frontend): add environment variables in .env.sample and README (#7401)
This commit is contained in:
parent
6541eab43b
commit
2a5e17d548
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user