ADSB updates
This commit is contained in:
@@ -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}`)
|
||||
});
|
||||
})()
|
||||
|
||||
Reference in New Issue
Block a user