diff --git a/.env.example b/.env.example index 27cd91e..9176b82 100644 --- a/.env.example +++ b/.env.example @@ -11,6 +11,7 @@ MQTT_PORT=1883 MQTT_USERNAME=meshdev MQTT_PASSWORD=large4cats MQTT_TOPIC=msh/US/# +MQTT_PUB_TOPIC="msh/US/2/json/mqtt/" # Optional: If you have your own MQTT broker # MQTT_BROKER=mqtt://your-broker.com diff --git a/.env.meshtastic b/.env.meshtastic new file mode 100644 index 0000000..1d01595 --- /dev/null +++ b/.env.meshtastic @@ -0,0 +1,27 @@ +# Server Configuration +PORT=3000 +NODE_ENV=development + +# Session Secret +SESSION_SECRET=test-secret-for-development-only + +# MQTT Configuration (Meshtastic Public Broker) +MQTT_BROKER=mqtt://mqtt.meshtastic.org +MQTT_PORT=1883 +MQTT_USERNAME=meshdev +MQTT_PASSWORD=large4cats +MQTT_TOPIC=# +MQTT_PUB_TOPIC="msh/US/2/json/mqtt/" + +# Data Retention (in days) +DATA_RETENTION_DAYS=30 + +# Cron schedule for automatic data purging (daily at 2 AM) +PURGE_CRON_SCHEDULE=0 2 * * * + +# Logging +LOG_LEVEL=info + +# Rate Limiting +RATE_LIMIT_WINDOW_MS=900000 +RATE_LIMIT_MAX_REQUESTS=1000 diff --git a/public/css/style.css b/public/css/style.css index 62216bd..83a20aa 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -114,6 +114,18 @@ body { font-size: 0.875rem; } +.data-last-received { + display: flex; + align-items: center; + gap: 0.25rem; + font-size: 0.875rem; + color: var(--text-secondary); +} + +.data-label { + opacity: 0.7; +} + /* Navigation Tabs */ .nav-tabs { background: var(--surface-color); diff --git a/public/index.html b/public/index.html index 36220ee..c033224 100644 --- a/public/index.html +++ b/public/index.html @@ -43,7 +43,7 @@ MQTT - Last data: 0s ago + Last data: 0s ago @@ -115,15 +115,8 @@