Sterling Fixtures API
These instructions are for use without docker
- Clone the repository https://github.com/hackthievist/sterling-fixtures.git
- Make sure that Node.js is installed.
- Install Node.js modules with
yarn
YarnPKG:
yarn install
- The API documentation with Postman can be found here
- To run the app, copy the file
.env.example
to.env
and substitute the settings to match your development environment. - Make sure
mongo
,redis
andelasticsearch
are installed and running if you plan on using them locally. - Start the app with
yarn
:
yarn start
- Navigate to localhost:3000. Please note
3000
is the default port used, you can change this in.env
.
- Tests are written using the Jest library.
- To run tests with
yarn
use:
yarn test
- Copy the files
docker-config/secrets.env.example
,docker-config/config.env.example
todocker-config/secrets.env
,docker-config/config.env
and substitute the settings to match your development environment.
Make sure mongodb is installed and running with IP bound to docker service mongo
mongod --bind_ip mongo
docker-compose up -d
- see logs
docker-compose logs -f
- run tests
docker-compose run --rm fixtures-api_web yarn test
- tear down
docker-compose down
- Navigate to https://sterlingfixtures.herokuapp.com or http://localhost:3000(docker standalone)
- There are 3 test suites, with 52 test cases for Fixture, Team and User. They can be found in tests/
- Backend Language + Framework: Nodejs + Express
- Database: MongoDB
- Testing Framework: Jest
- Hosting Server: Heroku
- Container Platform: Docker
- Session Management: Redis
- Authentication/Authorization: Bearer Token/JWT
- Dynamic Link Generator: Firebase Dynamic Links
- Rate Limit: Requests to the fixtures-api are limited to 50 per 15 minutes.