LAN multiplayer Ultimate tic-tac-toe client/server in typescript on node.
- Client: node term-grid-ui
- Server: node tRPC
sh docker-build.sh
sh docker-run-server.sh
host=localhost sh docker-run-client.sh
On your turn:
- Arrow keys to move around.
- Enter to select.
Install node with nvm.
nvm install # one-time install
nvm use # each time you enter the project directory
Install npm packages.
npm install
The server does not need config, but the client does.
You need to set the host
environment variable to the host name or ip address of the server.
You can use the .env dotenv file to set it.
npm run server
npm run client
While developing, you can skip building by using tsnode. You still need to setup your config as described above.
npm run server-dev
npm run client-dev
npm run all
# Run the tests with `npm run all` or
npm test
# This will generate the test coverage report
# Then open the test coverage report
firefox coverage/lcov-report/index.html
Run a manual live server test that simulates a complete game. First start the server.
npm run server-dev
Now run the test script.
npm run live-server-test
npm run doc
firefox docs/index.html &
npm run ncu