master | heroku | |
---|---|---|
tests | ||
coverage |
if you're using make
commands, docker and docker-compose are required, and local node.js with npm are optional
- node.js v10+
- npm v6+ or yarn
- optional makefile comes out of the box in unix enviroments
- optional docker v18.09+
- optional sqlite3 v3+ for 'integration' tests only
- with
make
commands no steps additional required, otherwise you need execute$ npm i
$ make test
or$ npm test
- optional 'jest' CLI params some examples:
- to generate coverage report, example:
$ npm test -- --coverage
, which will be located in ./coverage directory - to execute tests only in specific file, example:
$ npm test src/graphql/user.test.js
- to generate coverage report, example:
- optional 'jest' CLI params some examples:
$ make
or$ npm start
$ make serve
, there is no npm equivalent- if you only need to generate static assets
$ make build
or$ npm run build
- generated assets will be located in ./build directory
- master -> most up-to-date production version
- proxy branch heroku -> master is not deployed to heroku with every push, because of limitations of 'free account'
- other branches -> 'feature branches' get merged into master CI build is a mandatory check for every PR into master/heroku branches
variable | default value | used as |
---|---|---|
PORT | 8081 | number |
DB_HOSTNAME | 127.0.0.1 | string |
DB_USERNAME | root | string |
DB_PASSWORD | password | string |
DB_PORT | 3306 | number |
DB_NAME | battleship | string |
DB_DIALECT | mysql | string |
SECRET_KEY | local.key | string |
database | version |
---|---|
MySQL | 5.7 tested, using mysql2 |
PostgreSQL | 11 tested, using pg |
SQLite | 4.0.9 tested, using sqlite3 |