ADSB updates

This commit is contained in:
2026-06-25 10:15:23 -04:00
parent 19d2dd2d9d
commit afb530a999
6 changed files with 188 additions and 54 deletions

View File

@@ -8,10 +8,12 @@ import {getSpaceWeather} from './space.mjs';
import {apiReference} from '@scalar/express-api-reference';
import {spec} from './spec.mjs';
import {existsSync} from 'fs';
import {getADSB, getAirTrafficHistory, getAIS, getShapes} from './airtraffic.mjs';
import {getAIS} from './ais.mjs';
import {getADSB, getAirTrafficHistory, getShapes, initAircraftDb} from './adsb.mjs';
import {getWeatherCondition} from './openweather.mjs';
import {lastForecast, getForecast, forecastTTL} from './forecast.mjs';
import {dailyWeather, hourlyWeather} from './openmeteo.mjs';
import {init} from 'express/lib/application.js';
// import {Aurora} from './aurora.mjs';
// ── Uncaught error handlers ───────────────────────────────────────────────────
@@ -190,11 +192,14 @@ app.use((err, req, res, next) => {
// ── Start ─────────────────────────────────────────────────────────────────────
const c = cfg();
(async () => {
const c = cfg();
setTimeout(getForecast, 1)
setInterval(getForecast, forecastTTL)
setTimeout(getForecast, 1)
setInterval(getForecast, forecastTTL)
await initAircraftDb();
app.listen(c.PORT, () => {
console.log(`🌦 Weather API — http://localhost:${c.PORT}`)
});
app.listen(c.PORT, () => {
console.log(`🌦 Weather API — http://localhost:${c.PORT}`)
});
})()