Search for a Fantasy Premier League player by id and see their current score
To install dependencies:
bun install
To run:
bun run index.ts
This project was created using bun init
in bun v1.0.0. Bun is a fast all-in-one JavaScript runtime.
- Persist in-memory cache to disk - fly reboots often
- Periodically fetch interessting fpl profiles
- Logs
docker build -t fpl-buns:1.0 .
docker run -p 4001:4001 fpl-buns:1.0
Healthcheck
curl http://localhost:4001/
curl https://fpl-buns.fly.dev/
Fetch FPL profile
curl http://localhost:4001/fpl/profile\?entry\=10242940 | jq
curl https://fpl-buns.fly.dev/fpl/profile\?entry\=10242940 | jq
Fetch FPL leaderboard
curl http://localhost:4001/fpl/leaderboard | jq
curl https://fpl-buns.fly.dev/fpl/leaderboard | jq
Fetch FPL profile
curl http://localhost:4001/fpl/invalidate
curl https://fpl-buns.fly.dev/fpl/invalidate