refactor: move airports.json out of server/data into server/assets

server/data is for runtime state (SQLite, backups, logs, tmp) — the
airports snapshot is a shipped dataset, not user data, and it being in
there forced us to poke a hole in both .dockerignore and .gitignore.
Move it to server/assets/ and drop the exceptions; service and build
script point at the new path.
This commit is contained in:
Maurice
2026-04-18 02:02:09 +02:00
parent ec4aaa628f
commit 68a3036909
5 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env node
// Build server/data/airports.json from OurAirports (davidmegginson.github.io/ourairports-data).
// Build server/assets/airports.json from OurAirports (davidmegginson.github.io/ourairports-data).
// License: Public Domain. Keeps large/medium airports with an IATA code; timezone derived from coords via tz-lookup.
import fs from 'node:fs'
@@ -9,7 +9,7 @@ import { fileURLToPath } from 'node:url'
import tzLookup from 'tz-lookup'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const OUT = path.join(__dirname, '..', 'data', 'airports.json')
const OUT = path.join(__dirname, '..', 'assets', 'airports.json')
const SRC = 'https://davidmegginson.github.io/ourairports-data/airports.csv'
function fetchText(url) {