https://github.com/dobschal/soccer-manager
https://github.com/dobschal/soccer-manager
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dobschal/soccer-manager
- Owner: dobschal
- Created: 2023-07-19T05:20:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-28T15:49:59.000Z (almost 3 years ago)
- Last Synced: 2025-02-01T13:16:30.100Z (over 1 year ago)
- Language: JavaScript
- Size: 34.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 50
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Soccer Simulation

You need to have a MySQL database running and NodeJS installed.
Inside the `src` folder various scripts are available:
* `api.js` to start the web server with API
* `migrate-database.js` to setup the database tables
* `prepare-season.js` to fill the database with bot teams and games to play
* `play-game-day.js` calculate the results for the next game day
A UI is implemented. When you run the API, you can open the UI on http://localhost:3000
> !!! When starting the API with `api.js`, the other scripts are executed via CRON job automatically
## Run it
Run the scripts as described here:
```bash
# Install all dependencies
npm install
# Prepare database
node src/migrate-database.cmd.js
# Setup teams and games
node src/prepare-season.cmd.js
# calculate the games for the current gameday ---> repeat for each game day to play
node src/play-game-day.cmd.js
# Start game UI on port 3000
npm start
```