Based on a board game.
Forked from this commit of pig-card-game.
- npm install
- npm start- This starts 4 docker containers- robot-race-server: handles http requests
- robot-race-worker: handles game logic
- robot-race-front-end: rebuilds front-end during development
- redis: a Redis instance
 
- Click the fork button
- Create new empty repository on GitHub (or whatever)
- git clone https://github.com/nick-ng/robot-race.git <new-repo> && cd <new-repo>
- Change robot-raceto whatever you want and change my name to your name or something.
- git add . && git commit -m "anything. this will get squashed in the next step"
- git reset $(git commit-tree HEAD^{tree} -m "forked https://github.com/nick-ng/robot-race")
- git remote remove origin
- git remote add origin <url-of-repo-you-made>
- git push --set-upstream origin main
- Change branch permissions etc.
- ./build.shor- docker compose -f docker-compose.prod.yml build
- ./serve.shor- PORT=<desired-port> docker compose -f docker-compose.prod.yml up -d
- Change .github\workflows\deploy-front-end.ymlso theAPI_ORIGINis your Heroku App's url e.g.API_ORIGIN=https://${{secrets.HEROKU_APP_NAME}}.herokuapp.com
- Create an empty Heroku App. Note the app's name
- Get your Heroku API key from https://dashboard.heroku.com/account
- On GitHub repo for your fork, go to the Settings and click on Secrets > Actions
- Add 3 new repository secrets
- HEROKU_API_KEY: API key from above
- HEROKU_APP_NAME: App name from above
- HEROKU_EMAIL: Email address of your Heroku account
 
- Push a commit to the mainbranch
- Manually run the "Deploy Back-end" GitHub action
If you deploy to Heroku often, you can un-comment the "push" trigger in .github\workflows\deploy-back-end.yml
Create a /spec directory next to the files you want to test then create a file <name-of-file-to-test>.spec.cjs in that.
Check this GitHub Project for details.