A simple node.js backend to update stats to, and to serve stats from redis to Planet A Dashboard.
- An Express server configured in the src/index.ts file which serves data from redis whenever the
from
query param sent by the client is older than the last update (or else, a304 Not Modified
is served) - A node app running as daemon grabbing data from the Leap network every 10 seconds, updating redis
The client itself, which is hosted as a separate repo and is served via github.io.
You need to have a local Redis server running on port 6379
(the default). The Express server and the updater script both use the database at index 1
(so to connect to it, use redis-cli -n 1
).
npm run build
builds both the server and the updater. It currently fails with an error due to type definitions in the Leap library, but it actually does build TS into JS. The output is generated in thedist
folder.npm run dev
oryarn dev
launches the Express server locallynpm run dev-updater
oryarn dev-updater
launches the daemon script