A project building boardgame with React and boardgame.io
Mongodb
is required for development. Create a file named .env.local
into packages/web
and set your mongodb
url
MONGODB_URI = mongodb://localhost:27017/boardgame
Run below cmd if you are fist-time to clone this repo.
yarn db build
If do not update server just run
yarn web dev
else run
yarn dev
After development, you will run
yarn build
oryarn web build
before testing
Start testing
yarn e2e test
Test specific file
yarn e2e test packages/e2e/test/xxxx.e2e-spec.ts
disable headless mode
HEADLESS=false yarn e2e test
- Clone a template into
packages/web/src/games
node scripts/clone.js NewGameName
-
Open
packages/web/games/index.ts
andpackages/web/server/startServer.ts
. Import the new game correctly -
Start development :P
- Display player name
- Mongodb TTL
- i18n
- Lobby improvement