Description
CS546 Lab 6
JSON Routes
For this lab, you will create a simple server that will represent the same data that you created in lab 5 by sending JSON down through API calls.
For this lab, you will not need to use a database. You can store your data right in your routes.
Your routes
This route will return the following JSON:
This route will return the following JSON:
This route will return the following JSON:
https://sit.instructure.com/courses/16996/assignments/66194?module_item_id=376237 1/2 2/26/2017 Lab 6
Packages you will use:
You will use the express package as your server.
You must save all dependencies to your package.json file
Requirements
1. You must not submit your node_modules folder
2. You must remember to save your dependencies to your package.json folder
3. You must do basic error checking in each function 1. Check for arguments existing and of proper type.
2. Throw if anything is out of bounds (ie, trying to perform an incalculable math operation or accessing data that does not exist)
3. If a function should return a promise, instead of throwing you should return a rejected promise.
4. You must remember to update your package.json file to set app.js as your starting script!
5. You must submit a zip, rar, tar.gz, or .7z archive or you will lose points, named in the followign format:
https://sit.instructure.com/courses/16996/assignments/66194?module_item_id=376237 2/2
Reviews
There are no reviews yet.