Basic Pokemon CRUD
Assignment 1

Due before our week 5 class.

Counts for 10% of your final grade.

# The brief

This is the first of three take home assignments in this course that will be related, with later assignments building on the functionality of earlier ones. You are going to build the backend web services to support a simple class list application called cListR.

For this assignment, you will build the base for the cListR RESTful API using Node.js and the Express framework.

# Core Requirements

  1. Using the Express.js framework, the API will expose a full set of CRUD routes (six, including both put and patch) for pokemon resource:. All API resource paths must begin with /api.

The resource objects will have the following properties:

# Pokemon

Property Type
id Number
name String
type String
abilities [String]

Download the pokemon.json file from here (opens new window).


  1. Resource collections will be stored as in memory arrays stored in a separate module.
  1. Routes related to individual members of a resource collection should have validation for the id and return a properly formatted 404 response with an errors array.

  2. More robust data validation will be implemented in the next assignment, but for now ensure that only expected resource properties are stored for each member of the collection. Do not trust the id property in the req.body.

  3. Ensure that you write clean and readable code. Pay attention to:

  • no runtime errors
  • consistent 2 space indentation
  • logical grouping of related code
  • semantically descriptive names for variables and functions
  • well organized project folder structure
  • properly formatted package.json file
    • correct project name
    • your author details

# Submit

All work for this assigment should be completed in your private MAD9124 Github Repository that you have shared with me.

Create a commit to include all of your work from today.

Link the local repo to the GitHub repo and sync them up.

Submit the GitHub repo's URL on Brightspace.

TIP

It is a good habit to make a git commit as you complete each logical requirement. This not only tracks your progress, but protects your working code in case you later break it and need to roll back.

Last Updated: 2/2/2023, 9:01:45 PM