diff --git a/.env.example b/.env.example index 8696497..3c60df9 100644 --- a/.env.example +++ b/.env.example @@ -7,6 +7,6 @@ BASEPATH= NEXT_PUBLIC_APP_URL=http://localhost:9031 # API Configuration (Envoy Gateway) -NEXT_PUBLIC_API_URL=http://localhost:9035 +NEXT_PUBLIC_API_URL=http://85.208.253.135:8000 # MAPBOX_ACCESS_TOKEN=your-mapbox-access-token \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev deleted file mode 100644 index e69de29..0000000 diff --git a/ENV.md b/ENV.md index c4df2d6..9486e9c 100644 --- a/ENV.md +++ b/ENV.md @@ -14,9 +14,9 @@ This document describes all environment variables needed for the frontend applic - `NEXT_PUBLIC_DOCS_URL` - Documentation URL (optional) ### API Configuration -- `NEXT_PUBLIC_API_URL` or `ENVOY_GATEWAY_URL` - Envoy Gateway URL for backend API calls (e.g., http://localhost:9035) +- `NEXT_PUBLIC_API_URL` or `ENVOY_GATEWAY_URL` - Envoy Gateway URL for backend API calls (e.g., http://85.208.253.135:8000) - This is used by the frontend to communicate with backend services via Envoy Gateway - - Defaults to `http://localhost:9035` if not set + - Defaults to `http://85.208.253.135:8000` if not set ## Optional Environment Variables @@ -36,8 +36,8 @@ NEXT_PUBLIC_APP_URL=http://localhost:9031 NEXT_PUBLIC_DOCS_URL=https://demos.themeselection.com # API Configuration (Envoy Gateway) -NEXT_PUBLIC_API_URL=http://localhost:9035 -# Alternative: ENVOY_GATEWAY_URL=http://localhost:9035 +NEXT_PUBLIC_API_URL=http://85.208.253.135:8000 +# Alternative: ENVOY_GATEWAY_URL=http://85.208.253.135:8000 # Mapbox (Optional - for map features) MAPBOX_ACCESS_TOKEN=your-mapbox-access-token diff --git a/VIEWS_API_DOCUMENTATION.md b/VIEWS_API_DOCUMENTATION.md index 999bffa..013fd87 100644 --- a/VIEWS_API_DOCUMENTATION.md +++ b/VIEWS_API_DOCUMENTATION.md @@ -7,7 +7,7 @@ - **Todo** (`views/apps/todo`) - **Account Settings** (`views/pages/account-settings`) -> **Base URL:** `NEXT_PUBLIC_API_URL` یا `ENVOY_GATEWAY_URL` یا `http://localhost:9035` +> **Base URL:** `NEXT_PUBLIC_API_URL` یا `ENVOY_GATEWAY_URL` یا `http://85.208.253.135:8000` > **Authentication:** تمام درخواست‌ها نیاز به هدر `Authorization: Bearer {token}` دارند (توکن از `localStorage.auth_token` خوانده می‌شود) --- diff --git a/src/libs/api/client.ts b/src/libs/api/client.ts index 52e1803..75639fe 100644 --- a/src/libs/api/client.ts +++ b/src/libs/api/client.ts @@ -2,7 +2,7 @@ * API Client for communicating with Backend via Envoy Gateway */ -const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || process.env.ENVOY_GATEWAY_URL || 'http://localhost:9035' +const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || process.env.ENVOY_GATEWAY_URL || 'http://85.208.253.135:8000' export interface ApiError { message: string