Fix: move /api/iata-coords route after app initialization

Route was at line 16 before express app was created — caused
'Cannot access app before initialization' crash on startup.
This commit is contained in:
you committed 2026-03-22 22:26:15 +00:00
1 parent bd43936e8b
commit b7573df53e
1 file changed
+5 -5
+5 -5
View File
@@ -12,11 +12,6 @@ const decoder = require('./decoder');
const PAYLOAD_TYPES = decoder.PAYLOAD_TYPES;
const { nodeNearRegion, IATA_COORDS } = require('./iata-coords');
// IATA coordinates for client-side regional filtering
app.get('/api/iata-coords', (req, res) => {
res.json({ coords: IATA_COORDS });
});
// Health thresholds — configurable with sensible defaults
const _ht = config.healthThresholds || {};
const HEALTH = {
@@ -2919,6 +2914,11 @@ app.get('/api/analytics/subpath-detail', (req, res) => {
res.json(_sdResult);
});
// IATA coordinates for client-side regional filtering
app.get('/api/iata-coords', (req, res) => {
res.json({ coords: IATA_COORDS });
});
// Audio Lab: representative packets bucketed by type
app.get('/api/audio-lab/buckets', (req, res) => {
const buckets = {};