Generate your team's lineup
This project was built using Next.js, and follows the associated file organization.
The main structure of the data can be described in the Hierarchy document.
This project was built using a specific version of Node, found in the package.json file. If using nvm, you can switch to a valid version of Node using:
$ nvm use
Install dependencies:
$ yarn
Run the server with automatic restart:
$ yarn dev
The application will then be viewable at: http://localhost:3000
For production, run the following commands:
$ yarn build
...
$ yarn production
The application will be viewable on port 3000 (by default).
Configuration for the application is available within the config/index.js
file.
You can create your own team by creating a my-team.ts
file in the root of the project. This file should export an array of players (Player[]
). For example:
const myTeam: Player[] = [
...
];
module.exports = myTeam;
If this file exists, it will be used in the Game API, and shown in the UI.
The default log level is set to 'info'
. Most of the log messages within the application are at lower levels.
ESLint has been configured for the project. To lint the files:
$ yarn lint
Tests are written along side the source files, and include .test.
in the file name. To execute the tests, run the following command:
$ yarn test
To run the tests in watch mode:
$ yarn test:watch