- A league where users and admin can be created. Admins can go ahead to create teams and fixtures.
- Users can view pending or completed fixtures.
- The App is hosted on Heroku <heroku.com> via Docker at https://random-mock-league.herokuapp.com/v1/health
- Postman Collection can be found here https://documenter.getpostman.com/view/3343699/SzmiXGW6?version=latest
- node v12.14.0
- Node.js/TypeScript
- Express
- MongoDB
- Redis
- Docker
- Jest
- Create and Populate the .env file in the root directory with the appropriate environment variables.
- Run yarn from the root of the directory to install the required dependencies.
- You should have redis installed on your computer. Run redis-server to start up redis.
- Run yarn start-dev to start the app with ts-node
-
Update the .env file with the following variables.
- REDIS_URL=redis://redis:6379
- MONGO_URI=mongodb://mongo:27017/random-league
-
Run
yarn build
-
Run docker build . -t e.g
docker build . -t random-league
-
Run docker-compose up from the root directory.
-
Run docker ps from the root directory (in another terminal window) to get the available port.
- All tests cannot be run at once because of the database deoendency.
- Each test file has to be run on its own i.e.
- Run yarn test users.test.ts
- yarn test teams.test.ts
- yarn test fixtures.test.ts