fediversion/frontend/lib/api-config.ts
fullsizemalt b4cddf41ea feat: Initialize Fediversion multi-band platform
- Fork elmeg-demo codebase for multi-band support
- Add data importer infrastructure with base class
- Create band-specific importers:
  - phish.py: Phish.net API v5
  - grateful_dead.py: Grateful Stats API
  - setlistfm.py: Dead & Company, Billy Strings (Setlist.fm)
- Add spec-kit configuration for Gemini
- Update README with supported bands and architecture
2025-12-28 12:39:28 -08:00

12 lines
407 B
TypeScript

export function getApiUrl() {
if (typeof window === 'undefined') {
// Server-side
return process.env.INTERNAL_API_URL || 'http://localhost:8000'
}
// Client-side
const hostname = window.location.hostname
if (hostname === 'elmeg.xyz' || hostname === 'elmeg.runfoo.run') {
return '/api'
}
return process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000'
}