A lightweight Express-based map server and client for serving chart tiles, airport information, and weather data. The project is designed around MBTiles/SQLite map databases, with a client WebSocket stream for live weather updates.
This project contains the server and client sides for an express server with a front end client application and serves the following:
- serves any mbtiles map tile databases found in the
tiles/directory - exposes map metadata and tile endpoints for map clients
- downloads current weather data from https://aviationweather.gov/
- downloads include current Metars, TAFs, and Pireps
- download update intervals are controlled by user settings
- streams weather METAR/TAF/aircraft report data to client over WebSocket
- streams live NOAA weather radar from a starting point x minutes ago until present minute
- provides airport lookup endpoints using a bundled world-wide airport database
- stores per-user map state in a local SQLite database using signed cookies
It is used for browser-based aviation charts, weather and meteorological overlays.
server.js— Express server, database loading, weather downloads, and tile endpointsdist/— static frontend assets, produced by client vite buildtiles/— MBTiles/SQLite map datasets. App Looks for MBTiles databases to serve map tilesweather/— Aviationweather.gov weather files, downloaded at a user-defined interval and immediately sent to client(s)airports.db— SQLite airport database used for airport data, runways, and frequenciesmapstate.db— user state persistence for map settings - picks up where you left offconfig.yml— runtime configuration for ports, weather source URLs, and app defaults
- Node.js 24+
- npm
- Local map database files in
tiles/with.dbor.mbtilesextensions - Optional weather update sources and internet connectivity for pulling ADDS data
npm installThe main runtime settings live in config.yml:
httpport: 8600
startupzoom: 13
defaultposition:
- -98.23643
- 30.73659Key settings include:
httpport— HTTP server portwsroute— WebSocket endpoint pathstartupzoom— default map zoomdefaultposition— default map centerwxupdateintervalmsec— period for weather refresh checks
Start the app with:
npm startOr run directly:
node server.jsThe server listens on 0.0.0.0:8500 by default but will use any port you designate:
http://localhost:8500/
GET /— serves the map clientGET /api/config— returns configured app settingsGET /api/config/editandPOST /api/config/edit— configuration editor UI and persistence endpoint (config.yml)GET /databaselist— lists available databasesGET /airport?id=<identifier>— airport lookup by identifierGET /airportlist?...— airport search/list within map boundsGET /tiles/tilesets— returns metadata for all loaded map datasetsGET /tiles/:dbname/:z/:x/:y— serves map tilesGET /api/userdataandPOST /api/userdata— fetch/update user-specific map state- WebSocket at
/api/chartserver-stream— live weather updates
The app can download weather data from ADDS endpoints and save it under weather/. It then broadcasts the resulting JSON to connected browser clients over the WebSocket stream.
- The project expects map databases to exist in
tiles/before the server can serve chart layers. - The server creates and updates
mapstate.dbautomatically on first use. - Static assets are served from
dist/and are intended to be used with the browser front end.
This project is distributed under the Apache 2 License. See LICENSE for details.