A progressive Node.js framework for building efficient and scalable server-side applications.
A small API service to improve performance and loading times of the staking-launchpad. Initially the launchpad made a number of queries to beaconcha.in API using a subscribed key. This service aims to improve performance by caching results of the numerous queries. Caches results on a per validator basis.
eg if the user queries for /validators/performance/555555
and then later validators/performance/555555,555556
the API returns fresh results for 555556
(assuming it hasnt been queried before) and cached results for 555555
. The cache lifetime is 1 hour.
- Cache beaconchain results to improve API key usage and performance (this does not perform well if the user is querying an unknown list of validators for the first time)
- [] Continuously sync beaconchain results with some known list of PierTwo validators to greatly increase performance for a very large set of known validators
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
yarn start
Swagger docs at /api
Deployment is done manually through the GCP instance. Ensure you are on master.
git pull
docker build . -t staking-launchpad-api
docker run staking-launchpad-api