Objectives

In this Lab, you will be required to build the first version of our Donation Case Study Web App, called DonationWeb 1.0. We will scaffold the app similar to Lab 1, so if you're still a bit unsure of this process, maybe have a go at it again?

On completion of this lab you'll be able to

  • create a simple NodeJS app using express
  • run this app as a NodeJS Server and process client requests
  • be able to use npm to install dependency modules
  • be able to implement a simple Web APi

In this version we will be implementing a simple RESTful APi with the following routes

  • GET /donations - return a list of donations and associated metadata
  • GET /donations/:id - return an individual donation with associated metadata
  • POST /donations - create a new donation
  • PUT /donations/:id/upvote - upvote a donation, notice we use the donation ID in the URL
  • DELETE /donations/:id - delete a donation by ID