veza/apps/web/.env.example
senke a7209770bf fix(web): detect wrong server (HTML instead of JSON) and reduce console noise
- Detect when API returns HTML (e.g. another app on port 8080): show clear
  toast and reject so callers get an error instead of broken state
- Gate verbose API request/response/slow/error logs on VITE_DEBUG so
  console is quiet by default in dev; set VITE_DEBUG=true for full logs
- Avoid double toast and HTML dump in logs for wrong-server errors
- .env.example: clarify VITE_DEBUG enables API request/response logging

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 13:52:23 +01:00

50 lines
1.6 KiB
Text

# Veza Frontend Environment Variables
# Copy this file to .env.local and update with your values
# --- DOMAIN (single source of truth for frontend) ---
# All service URLs derive from this. Must match APP_DOMAIN in backend .env.
# Change this + /etc/hosts to switch domain.
VITE_DOMAIN=veza.fr
# API Configuration
# Base URL for the REST API (can be absolute URL or path starting with /)
# DEV: use /api/v1 so the Vite proxy forwards to the backend (same-origin cookies).
VITE_API_URL=/api/v1
# WebSocket Configuration
# WebSocket URL for real-time features (can be absolute URL or path starting with /)
# If omitted, auto-derived from VITE_DOMAIN: ws://<domain>:8081/ws
VITE_WS_URL=/ws
# Stream Server Configuration
# Stream server URL for audio streaming (can be absolute URL or path starting with /)
# If omitted, auto-derived from VITE_DOMAIN: ws://<domain>:8082/stream
VITE_STREAM_URL=/stream
# Upload Configuration
# Upload endpoint URL (can be absolute URL or path starting with /)
VITE_UPLOAD_URL=/upload
# Application Configuration
# Application name
VITE_APP_NAME=Veza
# API Version
# API version to use
VITE_API_VERSION=v1
# Debug Mode
# Enable verbose API request/response logging in console (true/1 or false/0)
VITE_DEBUG=false
# Mock Service Worker
# Enable MSW for API mocking in development (true/1 or false/0)
VITE_USE_MSW=0
# Firebase Cloud Messaging
# VAPID key for push notifications (optional)
# VITE_FCM_VAPID_KEY=your-vapid-key-here
# Sentry Error Tracking
# Sentry DSN for error tracking (optional)
# VITE_SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-id