Server/Client realtime multiplayer game using both UPD (WebRTC) for critical low-latency realtime messaging and TCP (WebSockets) for non-critical messaging.
Ensure required Node version 14
using nvm
.
nvm i
Install dependencies with yarn
.
yarn
To build for development
environment and enter watch mode, use two terminals.
One terminal is for building the source and detecting changes, the other is for running the server.
Keeping the output separate helps track server logs easier.
Terminal 1 - Build client + server src (enter watch mode) and serve client locally
This will produce atrifacts in the
./dist
folder
yarn dev
Terminal 2 - Start Express server with nodemon
(reload on changes).
Uses built files in
./dist
yarn start
Build for production.
yarn build:prod
Serve for production.
yarn serve:prod