master | heroku | |
---|---|---|
tests | ||
coverage |
if you're using make
commands, local node.js and npm aren't required
- node.js v10+
- npm v6+ or yarn
- optional makefile comes out of the box in *nix enviroments
- optional docker v18.09+
- optional docker-compose v3+ for 'cypress' tests only
- if you're using
make
commands and have docker and docker-compose installed, then no steps required - otherwise you need node.js installed, and execute
$ npm i
- 'cypress' integration tests
$ make cypress
or$ npm test
inside./cypress
directory - 'jest' unit and functional tests
$ make test
or$ npm test
- optional 'jest' CLI params
- to generate coverage report
--coverage
, example:$ npm test -- --coverage
, report will be located in ./coverage directory - to run tests only in specific file, example:
$ npm test src/validation/rules.test.js
- to generate coverage report
- optional 'jest' CLI params
$ make
or$ npm start
$ make serve
, there is no npm only analogue- to run on non-default port you can overwrite PORT variable, example
$ make serve PORT=18080
- to run on non-default port you can overwrite PORT variable, example
- if you need only generate static assets
$ make build
or$ npm run build
- generated assets will be located in ./build directory
- master -> most upto date production version
- proxy branch heroku -> master is not deployed to heroku with every push, because of limiations of 'free account'
- other branches -> 'feature branches' get merged into master CI build is mandatory check for every PR into master/heroku branches
variable | default value | used as |
---|---|---|
PORT | 8080 | number |
REACT_APP_GAME-MIN-SIZE | 5 | number |
REACT_APP_GAME-MAX-SIZE | 10 | number |
REACT_APP_GAME-MIN-OPPONENTS | 1 | number |
REACT_APP_GAME-MAX-OPPONENTS | 3 | number |
REACT_APP_API_PROTOCOL | http | string |
REACT_APP_API_HOST | localhost | string |
REACT_APP_API_PORT | 8081 | number |
REACT_APP_WEBSITE_NAME | Battleship | string |