Refactor camera management to conditionally import SDK and handle mock mode; update API base URL references to localhost in documentation and code.
This commit is contained in:
@@ -3,18 +3,18 @@
|
||||
#
|
||||
# CONFIGURATION:
|
||||
# - Default Base URL: http://localhost:8000 (local development)
|
||||
# - Production Base URL: http://vision:8000 (when using hostname 'vision')
|
||||
# - Production Base URL: http://localhost:8000 (when using hostname 'vision')
|
||||
# - Custom hostname: Update @baseUrl variable below
|
||||
#
|
||||
# HOSTNAME SETUP:
|
||||
# To use 'vision' hostname instead of 'localhost':
|
||||
# 1. Add to /etc/hosts: 127.0.0.1 vision
|
||||
# 2. Or configure DNS to point 'vision' to the server IP
|
||||
# 3. Update camera_preview.html: API_BASE = 'http://vision:8000'
|
||||
# 3. Update camera_preview.html: API_BASE = 'http://localhost:8000'
|
||||
###############################################################################
|
||||
|
||||
# Base URL Configuration - Change this to match your setup
|
||||
@baseUrl = http://vision:8000
|
||||
@baseUrl = http://localhost:8000
|
||||
# Alternative configurations:
|
||||
# @baseUrl = http://localhost:8000 # Local development
|
||||
# @baseUrl = http://192.168.1.100:8000 # Specific IP address
|
||||
@@ -30,8 +30,8 @@
|
||||
# - Requires hostname resolution setup
|
||||
# - Add to /etc/hosts: 127.0.0.1 vision
|
||||
# - Or configure DNS: vision -> server IP address
|
||||
# - Update camera_preview.html: API_BASE = 'http://vision:8000'
|
||||
# - Set @baseUrl = http://vision:8000
|
||||
# - Update camera_preview.html: API_BASE = 'http://localhost:8000'
|
||||
# - Set @baseUrl = http://localhost:8000
|
||||
|
||||
# Option 2: Using localhost (development)
|
||||
# - Works immediately on local machine
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface ApiConfig {
|
||||
}
|
||||
|
||||
export const defaultApiConfig: ApiConfig = {
|
||||
baseUrl: 'http://vision:8000', // Production default, change to 'http://localhost:8000' for development
|
||||
baseUrl: 'http://localhost:8000', // Production default, change to 'http://localhost:8000' for development
|
||||
timeout: 10000,
|
||||
refreshInterval: 30000,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
### USDA Vision Camera Streaming API
|
||||
###
|
||||
### CONFIGURATION:
|
||||
### - Production: http://vision:8000 (requires hostname setup)
|
||||
### - Production: http://localhost:8000 (requires hostname setup)
|
||||
### - Development: http://localhost:8000
|
||||
### - Custom: Update @baseUrl below to match your setup
|
||||
###
|
||||
@@ -9,7 +9,7 @@
|
||||
### Use with VS Code REST Client extension or similar tools.
|
||||
|
||||
# Base URL - Update to match your configuration
|
||||
@baseUrl = http://vision:8000
|
||||
@baseUrl = http://localhost:8000
|
||||
# Alternative: @baseUrl = http://localhost:8000
|
||||
|
||||
### =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user