This is a simple scoreboard for anyone who might be running some games over the holidays. Scores are fetched from a restdb.io database and updated automatically.
Enjoy and happy holidays!
scores
team
and score
(change the type of score
to number)GET
under REST methodsPOST:*
", "PUT:*
", and "DELETE:*
" pressing return after each one.env.local
in the same directory as this repository, add a line REACT_APP_RESTDB_KEY=<api key here>
After completing the setup, you can now run the scoreboard.
yarn start
Note that CORS is not correctly configured so if you want to access the scoreboard from any other machine, you'll have to do the following. This is dangerous as it could potentially allow remote code execution so run at your own risk.
DANGEROUSLY_DISABLE_HOST_CHECK=true yarn start
You can add/edit teams and scores from the restdb.io dashboard (it's rather mobile friendly). You'll see new teams appear and when scores change, there's a nice animation where the team slides into its new position based on the score.
Since this was built as a one-off project, there's no settings which can be easily configured, but there are a few things you may want to change.
Replacing public/background.jpg
will give you a new background image.
Changing the first number in grid-template-rows
in Scoreboard.css
will allow you to change the number of rows in each column.
You can also edit the font size in the .board
style and of course tweak anything else to your liking!