Skip to content

social-dist0rtion-protocol/planet-a-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Planet-A Backend

A simple node.js backend to update stats to, and to serve stats from redis to Planet A Dashboard.

What's in here

  1. 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, a 304 Not Modified is served)
  2. A node app running as daemon grabbing data from the Leap network every 10 seconds, updating redis

What's not in here

The client itself, which is hosted as a separate repo and is served via github.io.

Dependencies

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).

Node scripts

  • 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 the dist folder.
  • npm run dev or yarn dev launches the Express server locally
  • npm run dev-updater or yarn dev-updater launches the daemon script

About

A node backend to serve stats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published