Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# API Configuration
VITE_API_BASE_URL=https://api.openpodcast.dev
VITE_API_ANALYTICS_PATH=/analytics/v1
VITE_API_REGISTER_PATH=/register

# Development overrides (uncomment for local development)
# VITE_API_BASE_URL=http://localhost:8080
4 changes: 4 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Local development environment
VITE_API_BASE_URL=http://localhost:8080
VITE_API_ANALYTICS_PATH=/analytics/v1
VITE_API_REGISTER_PATH=/register
4 changes: 4 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Production environment
VITE_API_BASE_URL=https://api.openpodcast.dev
VITE_API_ANALYTICS_PATH=/analytics/v1
VITE_API_REGISTER_PATH=/register
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
587 changes: 587 additions & 0 deletions src/html/connect/index.html

Large diffs are not rendered by default.

582 changes: 582 additions & 0 deletions src/html/en/connect/index.html

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions src/js/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// API Configuration
// This file is generated during build process or manually configured
// for different environments

window.OpenPodcastConfig = {
// Default to production values
API_BASE_URL: 'https://api.openpodcast.dev',
API_ANALYTICS_PATH: '/analytics/v1',
API_REGISTER_PATH: '/register',

// Auto-detect local development
init() {
// Check if we're running locally
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
this.API_BASE_URL = 'http://localhost:8080';
}

return this;
},

// Get full API URLs
getRegisterUrl() {
return this.API_BASE_URL + this.API_REGISTER_PATH;
},

getAnalyticsUrl() {
return this.API_BASE_URL + this.API_ANALYTICS_PATH;
}
};

// Initialize config
window.OpenPodcastConfig.init();