Fixing current forecast

This commit is contained in:
2026-06-24 16:36:20 -04:00
parent d20ef97cf1
commit 83c2e655f6
2 changed files with 7 additions and 13 deletions

View File

@@ -10,7 +10,7 @@ import {spec} from './spec.mjs';
import {existsSync} from 'fs';
import {getAirTraffic, getAirTrafficHistory, getShapes} from './airtraffic.mjs';
import {getWeatherCondition} from './openweather.mjs';
import {lastForecast, getForecast} from './forecast.mjs';
import {lastForecast, getForecast, forecastTTL} from './forecast.mjs';
import {dailyWeather, hourlyWeather} from './openmeteo.mjs';
const app = express();
@@ -182,8 +182,8 @@ app.get('*', (req, res) => {
// ── Start ─────────────────────────────────────────────────────────────────────
const c = cfg();
setTimeout(getForecast, 2000)
setInterval(getForecast, 10 * 60 * 1000)
setTimeout(getForecast, 1)
setInterval(getForecast, forecastTTL)
app.listen(c.PORT, () => {
console.log(`🌦 Weather API — http://localhost:${c.PORT}`)