- feat/*
- feature/*
- fix/*
- hotfix/*
- facto/*
- refactorisation/*
npm run install
npm run dev
npm run build
npm run format
npm run lint
npm run check
npm run test
- Node.js
- TypeScript strict
- Express
- Socket.io
- Jest
In a new terminal instance, do:
cd backend
Install and run the server:
npm install
npm run start
Install and run the server with nodemon
watching:
npm install
npm run dev
npm run format
npm run lint
or
npm run lint:fix
npm run indent
npm run build
npm run testDev
npm run test
npm run check
ou
npm run test:open
npm run ibt
The mandatory environment variables needed to be set are (prod mode):
HOST=localhost
PORT=8080
PROTOCOL=ws
DESTROY_TIMER=15
DISCO_TIMER=15
START_GAME_TIMER=10
The timers variables are set in seconds. Then, into codebase, it will be converted into milliseconds.
If the DEV
variable is set to 1
the server will run in development mode.
The timers are decreased to:
- 10s for DESTROY_TIMER
- 10s for DISCO_TIMER
- 10s for START_GAME_TIMER The .env file is automatically created.
If the UNITSTESTS
variable is set to 1
the server will run in unit tests mode
The timers are decreased to:
- 1s for DESTROY_TIMER
- 1s for DISCO_TIMER
- 5s for START_GAME_TIMER The .env file is automatically created.
If the DEV
and the UNITSTESTS
variables are unset, we are in production mode.
The timers are decreased to:
- 15s for DESTROY_TIMER
- 15s for DISCO_TIMER
- 10s for START_GAME_TIMER The .env file should be handled by the provider.
cp .env.example .env
docker-compose up
or
make start