From 825e99c59b67c17092dc389ba0973f6b6bc63003 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Tue, 11 Nov 2025 17:04:26 +0100 Subject: [PATCH] Update api-config.ts --- AppImage/lib/api-config.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/AppImage/lib/api-config.ts b/AppImage/lib/api-config.ts index f5aea73..8ee2ff6 100644 --- a/AppImage/lib/api-config.ts +++ b/AppImage/lib/api-config.ts @@ -3,6 +3,14 @@ * Handles API URL generation with automatic proxy detection */ +/** + * API Server Port Configuration + * Default: 8008 (production) + * Can be changed to 8009 for beta testing + * This can also be set via NEXT_PUBLIC_API_PORT environment variable + */ +export const API_PORT = process.env.NEXT_PUBLIC_API_PORT || "8008" + /** * Gets the base URL for API calls * Automatically detects if running behind a proxy by checking if we're on a standard port @@ -30,8 +38,8 @@ export function getApiBaseUrl(): string { console.log("[v0] getApiBaseUrl: Detected proxy access, using relative URLs") return "" } else { - // Direct access - use explicit port 8008 - const baseUrl = `${protocol}//${hostname}:8008` + // Direct access - use explicit API port + const baseUrl = `${protocol}//${hostname}:${API_PORT}` console.log("[v0] getApiBaseUrl: Direct access detected, using:", baseUrl) return baseUrl }