Commit Graph
21 Commits
Author SHA1 Message Date
Matt Walsh 11d94f3aeb change retry to an await and timeout loop 2026-10-01 14:12:33 -05:00
Matt Walsh 26c6703ecd code cleanup, efficiency, loading order 2026-09-28 22:45:24 -05:00
Matt Walsh 4b61a07d2a minor code cleanup 2026-09-28 22:00:23 -05:00
Matt Walsh f3503e329a music auto play, custom scroll text and gps failure fixes 2026-09-27 17:44:45 -05:00
Matt Walsh 806577d02c surface point lookup errors 2026-09-24 12:16:14 -05:00
Matt Walsh 5047f97495 code cleanup 2026-09-24 11:41:33 -05:00
Matt Walsh 4df95fb15e clean up current weather and hazards 2026-09-16 13:39:13 -05:00
Matt Walsh 2b4f83cfc0 update eslint and adjust code for best practices 2026-09-14 13:03:50 -05:00
Eddy G 4b34ffabcb Fix retry count display in doFetch 2025-07-13 19:45:52 -04:00
Eddy G 771ab37eaf Improve cache error handling in various edge cases
- Add null-safe operations and fallbacks for missing properties
- Simplify retry logic and enhance error logging
- Enable default retries and improve timeout handling
2025-07-07 12:43:32 -04: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
Eddy G 7a07c67e84 Replace CORS proxy with complete server-side cache
- Replace cors/ directory and cors.mjs utility with comprehensive
    HTTP caching proxy in proxy/ directory
- Implement RFC-compliant caching with cache-control headers,
    conditional requests, and in-flight deduplication
- Centralized error handling with "safe" fetch utilities
- Add unified proxy handlers for weather.gov, SPC, radar, and mesonet APIs
- Include cache management endpoint and extensive diagnostic logging
- Migrate client-side URL rewriting from cors.mjs to url-rewrite.mjs
2025-06-24 20:45:43 -04:00
Matt Walsh 7efd2e8db7 add scanlines 2025-05-29 17:03:50 -05:00
Matt Walsh 32aa43c5b1 update user-agent header, now allowed in some browsers 2025-05-29 14:18:49 -05:00
Matt Walsh 0baa31a92c local forecast silent refresh 2025-04-02 20:52:33 -05:00
Matt Walsh e2d7a96971 linting cleanup 2024-10-21 19:21:05 -05:00
Matt Walsh 7be20490e8 remove localhost-specific protocol matching 2024-05-08 16:30:11 -05:00
Matt Walsh 3743c45de6 additional eslint rules 2023-01-06 14:39:39 -06:00
Matt Walsh 3078ae6ba1 remove unused code 2022-12-14 08:31:48 -06:00
Matt Walsh 5dd8f4bd62 auto-retry for some forecast data 2022-12-12 13:53:33 -06:00
Matt Walsh cc61d2c6d1 weather displays complete 2022-11-22 16:19:10 -06:00