This application is built to support NodeJS v8 LTS and later.
It is advised to use Yarn as a package manager.
Any database supported by KnexJS can be used.
After cloning the repository, run yarn
to install all dependencies.
Before running the application, run the following commands:
cp knexfile.js.example knexfile.js
cp .env.example .env
Now set your configs in the knexfile.js
and .env
files.
For starting the application, run yarn run start
, with the NODE_ENV
environment variable set matching the environment you want to use in your knexfile.js
file.
The NODE_ENV
s available by default (package.json) are:
development
, foryarn run dev
production
, foryarn run start
test
, foryarn run test
,yarn run test:watch
andyarn run coverage
For development and running the integration tests, PostgreSQL should be used.
To use Nodemon (auto restart on save), run yarn run dev
.
If you want to run the tests while developing, run yarn run test:watch
.
Tests should be present where possible. Jest is used as testing framework.
For any pull-requests to be accepted, the following commands should pass:
yarn run lint
yarn run test
yarn run build
For checking the code coverage, run yarn run coverage
.
TODO: Add Swaggerhub
All routes are based on /api/v1
Returns http code 200
name: string
Requires auth, add an Authentication
header with value Bearer [token]
.
teamid: number
Requires auth, add an Authentication
header with value Bearer [token]
.
teamid: number
username: string
email: string
teamid: number
password: string
Return includes a JWT
username: string
password: string
Requires auth, add an Authentication
header with value Bearer [token]
.
teamid: number
player1id: number
player1score: number
player2id: number
player2score: number
winner: number
addedby: number
This project is AGPL-3.0 licensed.
This project is maintained by Bytecode Digital Agency.
Currently, this project is maintained by Bytecode team-members:
For questions regarding this project, please send an email to [email protected].