The purpose of this project is to give you an opportunity to showcase your coding style with node.
You can use any tools (IDE, npm, ...) and resources (google, stackoverflow,...) you use in your day to day. However, you should come up with the implementation on your own.
We need to manage players, with data consisting of:
id
— player's unique IDname
— player's full nameteam
— player's team — one ofred
,blue
,green
, oryellow
isActive
— player's status,true
orfalse
points
— player's points [0
—100
]
For that purpose create a REST API with the following endpoints:
GET /players
— lists all playersPOST /players
— creates new playerGET /players/:id
— get a playerDELETE /players/:id
— deletes a playerPUT /players/:id
— update a player
-
Code must be written using
standard
style convention -
Code should run in
Node 8.10
-
Code should be tested (we use and prefer
jest
, but other testing frameworks will do) -
Use
./src/db.json
as a starting list of players — you can continue usingdb.json
to store the players for this project, or you can just use it to import the players into a DB of your choice if that works better for you -
Free to use anything for developing and hosting the API (express, Heroku, AWS, Google Cloud etc.), anything works as long as it's JavaScript
-
Although not required, bonus points for pagination, sorting, and filtering
- Clone (not fork) this repo
- Implement a working solution
- Submit the links to your PGA contact
- Make sure to have working S3 bucket named
pga.players.db.bucket
which works as player DB - Also ensure to have S3 bucket for sls package upload named as
pga.codetest.sls.package.bucket
- Serverless Functions - Packaging Command
sam package --output-template-file packaged.yaml --s3-bucket pga.codetest.sls.package.bucket
- Serverless Functions - Deploy Command
sam deploy --template-file packaged.yaml --stack-name pga-codetest-sls-stack --capabilities CAPABILITY_IAM --region us-east-2
- Refer
postman-col
folder at project root and it contains postman collection containing all APIs