diff --git a/package.json b/package.json index 55959de0..dfb372bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcore-analyzer", - "version": "2.1.0", + "version": "2.1.1", "description": "Community-run alternative to the closed-source `analyzer.letsmesh.net`. MQTT packet collection + open-source web analyzer for the Bay Area MeshCore mesh.", "main": "index.js", "scripts": { diff --git a/server.js b/server.js index 9b238704..6f5d2311 100644 --- a/server.js +++ b/server.js @@ -259,8 +259,10 @@ class TTLCache { const cache = new TTLCache(); -// Seed DB if empty -db.seed(); +// Seed DB only when explicitly requested via --seed flag or SEED_DB=true env var +if (process.argv.includes('--seed') || process.env.SEED_DB === 'true') { + db.seed(); +} const app = express();