A Java web app for tracking cribbage games locally with score history and exactly 2 players per game. https://cribbagecounter.onrender.com
- No login required
- Local file persistence for games, score events, and player-name wins/losses
- Create new games with exactly 2 players
- Live scoreboard updates by adding score events
- Finish a game and store winner/loser records locally
- Java 11
- Javalin (web server)
- Maven
- Copilot (code generation)
- Render (deployment)
- Copy
.env.exampleto.env. - Optionally change
DATA_FILEandPORT.
cp .env.example .envEnvironment variables:
DATA_FILE(optional, defaults todata/local-store.ser)PORT(optional, defaults to7070)
mvn test
mvn compile exec:javaThen open: http://localhost:7070
This repo now includes render.yaml and a Dockerfile.
- Push this repo to GitHub.
- In Render, create a Blueprint from the repo.
- Render reads
render.yamland creates:- a web service
- a persistent disk mounted at
/var/data
- Confirm env vars in Render:
PORT=10000DATA_FILE=/var/data/local-store.ser
Your game/user stats persist on the disk across deploys and restarts.
mvn package creates a runnable fat jar at:
target/cribbage-counter.jar
All data is stored on disk in one local file (data/local-store.ser by default):
- games
- score events
- player-name stats (wins/losses)
If you want a fresh start, stop the app and delete the data file.