The Eagles API is a RESTful API built with NestJS that provides basic player information for players on the current roster of the Philadelphia Eagles. The API is built with NestJs and is deployed to an AWS Lambda using the Serverless framework.
- Documentation
- Installation
- Roster Update Script
- Running the App
- Testing
- Deploying (Serverless)
- CI/CD
`https://5o1j7ybsh2.execute-api.us-east-1.amazonaws.com/prod`
-
GET /players - Retrieves all players.
-
GET /players/random - Retrieves a random player.
-
GET /players/:jerseyNumber - Retrieves a player based on the inputted jersey number.
-
GET /players/position/:position - Retrieves players based on the inputted position.
To install the necessary dependencies, run the following command:
$ npm install
To update the roster information, run the following command:
$ npm run updateRoster
To run the app, use the following commands:
# development
$ npm run start
# watch mode
$ npm run start:dev
# serverless mode
$ sls offline
To run tests, use the following commands:
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
To deploy the app using Serverless, use the following commands:
# build application
$ npm run build
# deploy aws lambda (dev)
$ sls deploy
# deploy aws lambda (prod)
$ sls deploy --stage prod
Automatic deployment of the API will occur each time a change is made on the main branch.