Roster Royale

Admin

Data status

Where each league's teams and players come from, and how fresh they are. Games already in progress keep the stats players had when they were drafted.

How to refresh

Run these in the project folder on the machine that hosts the game.

1. Fetch fresh data into a snapshot file

npm run data:import -- --league all

Every league (takes a few minutes).

npm run data:import -- --league nfl
npm run data:import -- --league nhl
npm run data:import -- --league mlb
npm run data:import -- --league all --sample

Offline or just exploring? This writes clearly-labelled development sample data instead.

2. Load the snapshots into the database

npm run data:load

A running server caches each league for about five minutes, so CLI-loaded data appears shortly. The form on this page applies immediately.

Refresh from this page

Needs the ADMIN_TOKEN configured on the server.

Kept in memory for this request only. It is never stored, put in the address bar or logged, and is cleared after a successful refresh.

Source

Loads data/snapshots/nfl.json into the database. Quick, and needs the file from npm run data:import.