Commit Graph
7 Commits
Author SHA1 Message Date
Matt Walsh cf0157ace5 include custom files in buildDist (and update docker accordingly) 2026-10-01 15:31:33 -05:00
Matt Walsh 2fba267cc9 include custom files in docker when present 2026-10-01 15:23:25 -05:00
Matt Walsh 6b58fd7ce5 docker build updates + icons 2026-09-24 15:05:07 -05:00
Matt Walsh 5047f97495 code cleanup 2026-09-24 11:41:33 -05:00
Matt Walsh b2507b4a5b clean up unused eslint rules 2026-09-14 14:12:40 -05:00
Matt Walsh 0d0c4ec452 fix Dockerfile.server build close #142 2025-09-09 20:06:54 -05:00
Eddy G 7f7cb96231 Add STATIC environment variable for browser-only deployment mode
Implement STATIC=1 environment variable to enable browser-only deployment
without proxy server infrastructure. Uses WS4KP_SERVER_AVAILABLE flag to
distinguish between server-backed and static deployments for proper URL
rewriting and User-Agent header handling.

- Add STATIC env var to skip proxy route registration at startup
- Inject WS4KP_SERVER_AVAILABLE flag via EJS template based on STATIC mode
- Update fetch.mjs to conditionally send User-Agent headers based on server availability
- Update url-rewrite.mjs to skip proxy rewriting when server is unavailable
- Use renderIndex helper for consistent template data across dev/prod modes
- Improve music playlist logging

Benefits of integrated approach:
- Single environment variable controls both server and client behavior
- Flag injection happens once at render time, not on every request
- No runtime HTML string manipulation overhead
- Clean separation between server-backed and static deployment logic
- Same codebase supports both deployment modes without duplication

Static mode (STATIC=1): Direct API calls to external services, no caching
Server mode (default): Local proxy with caching and API request observability
2025-06-26 20:10:11 -04:00