No Description

johan b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
app-server b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
jsdoc b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
public b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
server b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
src b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
tests b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
.browserslistrc b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
.eslintignore b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
.eslintrc.js b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
.gitignore b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
Dockerfile b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
README.md b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
babel.config.js b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
docker-compose.yaml b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
jsconfig.json b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
package-lock.json b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
package.json b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
project.code-workspace b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago
vue.config.js b51b8193ae change game query for new status(PLAYING/PAUSED) & provide game id to app (& remove unused code server-login.js) 4 years ago

README.md

TWELVE HEROES

The digital version of the boardgame - Implementation in progress

This is a web version on the 12 heroes board game that I am coding for fun as a personal project. It is far from being complete and production ready.

Game official rules : https://cloud.jojolab.net/s/pBnC6wsSKC4E3RX

Here you have :

  • A vueJS app with :
    • socket.io client for communication with backend
    • game menus
    • start of the game logic : build the start deck
  • A NodeJS backend server :
    • talks to a MariaDB
    • Authenticate users
    • implements game logic

What's left :

  • Better look & feel, especially for cellphones
  • game logic
  • tests (shoud have started with that :) )

Project setup

npm install
cd server && npm install

Compiles and hot-reloads for development in Firefox browser

npm run dev

Start dev server

npm run server-dev

How to deploy using docker compose

See in the docker-compose.yaml file, you will need to export some environment variables. You can do a .env file with :

# HOST and PORT of the backend server for client socket connection
export VUE_APP_SERVER_HOST=
export VUE_APP_SERVER_PORT=
# Port on which you want to expose the game app
export VUE_APP_PORT=

## backend MariaDB information :
# DB host (usually localhost as same machine as the backend)
export DB=
# DB port (by default 3306 for mysql/MariaDB)
export DB_PORT=
# Depends on your DB config, you can connect to a unix socket instead of port
export DB_SOCKET=
# Database name
export DB_NAME=
# User and password
export DB_USER=
export DB_PASS=

Then you just need to do :

source .env
docker-compose build
deocker-compose start
## Or docker-compose up    to get logs

Recommended VS code plugins :

  • Vetur
  • Vue 2 Snippets
  • Vue VSCode Snippets
  • ESlint
  • Prettier ESLint
  • All Autocomplete
  • Bootstrap 4, Font awesome 4, Font Awesome 5 Free
  • SCSS IntelliSense