Giter Site home page Giter Site logo

players-api-proj's Introduction

PGA Recruiting - Players API Project

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.

Overview

We need to manage players, with data consisting of:

  • id — player's unique ID
  • name — player's full name
  • team — player's team — one of red, blue, green, or yellow
  • isActive — player's status, true or false
  • points — player's points [0100]

For that purpose create a REST API with the following endpoints:

  • GET /players — lists all players
  • POST /players — creates new player
  • GET /players/:id — get a player
  • DELETE /players/:id — deletes a player
  • PUT /players/:id — update a player

Requirements

  • 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 using db.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

Submitting the project

  • Clone (not fork) this repo
  • Implement a working solution
  • Submit the links to your PGA contact

Serverless Functions - Packaging and Deployment

  • 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

How to test APIs?

  • Refer postman-col folder at project root and it contains postman collection containing all APIs

players-api-proj's People

Contributors

shailesh-kanzariya avatar van100j avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.