CI/CD
This commit is contained in:
+1
-1
@@ -7,6 +7,6 @@ BASEPATH=
|
|||||||
NEXT_PUBLIC_APP_URL=http://localhost:9031
|
NEXT_PUBLIC_APP_URL=http://localhost:9031
|
||||||
|
|
||||||
# API Configuration (Envoy Gateway)
|
# 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
|
# MAPBOX_ACCESS_TOKEN=your-mapbox-access-token
|
||||||
@@ -14,9 +14,9 @@ This document describes all environment variables needed for the frontend applic
|
|||||||
- `NEXT_PUBLIC_DOCS_URL` - Documentation URL (optional)
|
- `NEXT_PUBLIC_DOCS_URL` - Documentation URL (optional)
|
||||||
|
|
||||||
### API Configuration
|
### 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
|
- 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
|
## Optional Environment Variables
|
||||||
|
|
||||||
@@ -36,8 +36,8 @@ NEXT_PUBLIC_APP_URL=http://localhost:9031
|
|||||||
NEXT_PUBLIC_DOCS_URL=https://demos.themeselection.com
|
NEXT_PUBLIC_DOCS_URL=https://demos.themeselection.com
|
||||||
|
|
||||||
# API Configuration (Envoy Gateway)
|
# API Configuration (Envoy Gateway)
|
||||||
NEXT_PUBLIC_API_URL=http://localhost:9035
|
NEXT_PUBLIC_API_URL=http://85.208.253.135:8000
|
||||||
# Alternative: ENVOY_GATEWAY_URL=http://localhost:9035
|
# Alternative: ENVOY_GATEWAY_URL=http://85.208.253.135:8000
|
||||||
|
|
||||||
# Mapbox (Optional - for map features)
|
# Mapbox (Optional - for map features)
|
||||||
MAPBOX_ACCESS_TOKEN=your-mapbox-access-token
|
MAPBOX_ACCESS_TOKEN=your-mapbox-access-token
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
- **Todo** (`views/apps/todo`)
|
- **Todo** (`views/apps/todo`)
|
||||||
- **Account Settings** (`views/pages/account-settings`)
|
- **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` خوانده میشود)
|
> **Authentication:** تمام درخواستها نیاز به هدر `Authorization: Bearer {token}` دارند (توکن از `localStorage.auth_token` خوانده میشود)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* API Client for communicating with Backend via Envoy Gateway
|
* 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 {
|
export interface ApiError {
|
||||||
message: string
|
message: string
|
||||||
|
|||||||
Reference in New Issue
Block a user