Events are stored in MongoDB so they persist across restarts and page refreshes.
Run MongoDB in a container (data persisted in a Docker volume):
docker compose up -dThen start the backend; it will connect to localhost:27017 by default. Stop with docker compose down; use docker compose down -v to remove the data volume.
Clear all stored events (from the backend directory): npm run clear-db
- Backend: Set
MONGODB_URI(default:mongodb://localhost:27017/t5rg) and ensure MongoDB is running. Events from the live stream and fromPOST /eventsare saved to theeventscollection. - Frontend: On load, fetches persisted events from
GET /api/events, then connects to the live stream for new events.