Add MapClick adapter and "fallback" logic when observations are stale
- Create utils/mapclick.mjs with centralized MapClick API functionality - Refactor modules to use the new utility: - Current Weather - Latest Observations - Regional Forecast - Add staleness checking utility for use by modules
This commit is contained in:
parent
e81c957416
commit
996baa78aa
10 changed files with 814 additions and 60 deletions
|
|
@ -42,3 +42,11 @@ export const mesonetProxy = async (req, res) => {
|
|||
encoding: isBinary ? 'binary' : 'utf8', // Use binary encoding for images
|
||||
});
|
||||
};
|
||||
|
||||
// Legacy forecast.weather.gov API proxy
|
||||
export const forecastProxy = async (req, res) => {
|
||||
await cache.handleRequest(req, res, 'https://forecast.weather.gov', {
|
||||
serviceName: 'Forecast.weather.gov',
|
||||
skipParams: ['u'],
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue